© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
4 replies
MrOlon

Multiple submit buttons in Action's modal

Hello!
Is it possible with Filament admin panel to have multiple submit buttons in an Action's modal with different "values" to trigger different behaviors in the actual action closure?

Some context:
I have this Action on a table with a custom modal. In the action Closure I would access the submit "value" or some other info to determine which action to perform:
Action::make('my_action')
  ->modalContent(function (/* ... */) {
      return view(/* ... */);
  })
  ->form([
       /* ... */
  ])
  ->action(function ($data) {
      // Can I know here what submit was pressed? <---
      // keep_first or keep_last?
  })
  ->modalActions([
    \Filament\Tables\Actions\Modal\Actions\Action::make('keep_first')
      ->submit(),
    \Filament\Tables\Actions\Modal\Actions\Action::make('keep_last')
      ->submit(),
  ]),
Action::make('my_action')
  ->modalContent(function (/* ... */) {
      return view(/* ... */);
  })
  ->form([
       /* ... */
  ])
  ->action(function ($data) {
      // Can I know here what submit was pressed? <---
      // keep_first or keep_last?
  })
  ->modalActions([
    \Filament\Tables\Actions\Modal\Actions\Action::make('keep_first')
      ->submit(),
    \Filament\Tables\Actions\Modal\Actions\Action::make('keep_last')
      ->submit(),
  ]),

^ with this I'm able to show two different buttons which can submit the form but I don't know how to know which one was pressed

Thanks in advance!
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

Remove Buttons in Action Modal
FilamentFFilament / ❓┊help
2y ago
Move Modal's Create Action to Wizard Submit Action
FilamentFFilament / ❓┊help
2y ago
Secondary Modal Submit Action with RequiresConfirmation
FilamentFFilament / ❓┊help
13mo ago
Bulk Action Button on Modal Submit
FilamentFFilament / ❓┊help
15mo ago