SaveFormAction : requiresConfirmation()
What I am trying to do : I just want to add a confirmation modal when the "save changes" button is clicked for My Edit{Resource}. To do that, I overrided the getSaveFormAction method (see code below)
What I did : nothing and no errors in console or in the page
Code :
Is there another way to accomplish that ?
4 Replies
you could try this
https://github.com/filamentphp/filament/discussions/9537
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...
Thanks @Leandro Ferreira ! I've managed to get it to work, in fact it seems to be the submit() method that's preventing the modal from being displayed, but I can't figure out why. Anyway thanks for your help π
try
not sure if ->submit(null) will work
It works like this too :