Confirm modal before saving form
Hi,
I'm using the form builder for my resource, but before the form is submitted and the model is created, I want to show a confirmation form.
How can I do that?
I've searched the docs and discord, but couldn't find anything.
Thanks for your help.
6 Replies
https://github.com/filamentphp/filament/discussions/9537#discussioncomment-7512865
change 'create' to another name like
make('customCreate')
GitHub
How to make confirmation modal before create in CreatePage · filame...
protected function beforeCreate(): void { Notification::make() ->warning() ->title('Attention') ->body('This will notify to all user!') ->persistent() ->actions([ Act...
I just noticed that it's not a resource, but a Livewire component:
The solution you sent doesn't seem to work with this
I have this code that creates the record in my Livewire component and I would like to have a confirmation modal here
You can use a custom action with
->requiresConfirmation()
https://filamentphp.com/docs/3.x/actions/adding-an-action-to-a-livewire-componentI've added these, but nothing happens when I create a new record