Modal in form Resource
In my Filament project, I would like to introduce a modal in the function form of my Resource to indicate the available shortcodes that my writers can use. How can I insert this button that opens a modal?
3 Replies
The best candidate for what you are trying to achieve would be hint action. Basically on any field you can define hint action that can open the modal with instructions:
More on hint actions here:
https://filamentphp.com/docs/3.x/forms/actions#passing-multiple-hint-actions-to-a-field
with:
I get the error:
LOG.error: Filament\Forms\Components\Field::hintAction(): Argument #1 ($action) must be of type Filament\Forms\Components\Actions\Action|Closure, Filament\Tables\Actions\Action given
You imported the wrong action. Change your use statement at the top of the file to use the forms components action.