Dhru
Fileupload: How to show a default image that the user can override with their own image
actually did a search on discord and found a solution haven't tired it yet:
Forms\Components\FileUpload::make('company_logo')
->label('Company Logo')
->image()
->required()
->rules([
'image',
'mimes:jpeg,png,jpg',
'max:2048',
'dimensions:max_width=300,max_height=200',
])
->formatStateUsing(fn ($record) => $record?->company_logo ?? asset('/images/company_logo.png'))
->disk('company_logo') // from filesystems.php
->maxFiles(1)
3 replies
Wizard Form disable next/previous
documentation seenms to have info on it actually
https://filamentphp.com/docs/3.x/forms/layout/wizard#preventing-the-next-step-from-being-loaded
7 replies
Wizard Form disable next/previous
Should be straightforward using step life cycle hooks
See under
https://filamentphp.com/docs/3.x/forms/layout/wizard#step-lifecycle-hooks
7 replies