© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
8 replies
Antoine

How to add requiresConfirmation() into modalSubmitAction() in Action

Hello,

I have an action in my ListRecords page who open a modal and I need to have a modal of confirmation when the user click on the Button Submit.

Action::make('settings')
  ->form(...)
  ->action(...)
  ->modalSubmitAction(fn($action) => $action
      ->label('Enregistrer')
      ->requiresConfirmation() // this way doesn't work...
  )
  ->modalCancelAction(fn($action) => $action->label('Fermer'));
Action::make('settings')
  ->form(...)
  ->action(...)
  ->modalSubmitAction(fn($action) => $action
      ->label('Enregistrer')
      ->requiresConfirmation() // this way doesn't work...
  )
  ->modalCancelAction(fn($action) => $action->label('Fermer'));


It doesn't work because it's a StaticAction in modalSubmitAction().
How can I do that?
Thanks
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Add another button to Action requiresConfirmation()
FilamentFFilament / ❓┊help
2y ago
add requiresConfirmation to save action on Edit - Resource
FilamentFFilament / ❓┊help
2y ago
Add requiresConfirmation to save or create action with validation
FilamentFFilament / ❓┊help
17mo ago
Custom requiresConfirmation() dialog in table Action
FilamentFFilament / ❓┊help
3y ago