F
Filament7mo ago
Azorky

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
LeandroFerreira
LeandroFerreira7mo ago
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...
Azorky
Azorky7mo ago
I just noticed that it's not a resource, but a Livewire component:
No description
Azorky
Azorky7mo ago
The solution you sent doesn't seem to work with this
Azorky
Azorky7mo ago
I have this code that creates the record in my Livewire component and I would like to have a confirmation modal here
No description
Azorky
Azorky7mo ago
I've added these, but nothing happens when I create a new record
No description