© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
1 reply
Ric Le Poidevin

Validate and save before opening modal

I have an edit page with a header action that opens a modal.

I need to save (and validate) the current record before opening modal as it depends on that data being saved as it’s a publish action. The form I need to save is a wizard if that makes any difference.

My header action:

\Filament\Actions\Action::make('Publish!')
    // Validate and save current record, then open modal if it passed, or cancel if validation fails
    ->closeModalByClickingAway(false)
    ->slideOver()
    ->form([
        VacancyPayment::make('Publish details'),
    ])
    ->modalSubmitAction(false)
    ->modalCancelActionLabel('Close')
    ->stickyModalFooter(false),
\Filament\Actions\Action::make('Publish!')
    // Validate and save current record, then open modal if it passed, or cancel if validation fails
    ->closeModalByClickingAway(false)
    ->slideOver()
    ->form([
        VacancyPayment::make('Publish details'),
    ])
    ->modalSubmitAction(false)
    ->modalCancelActionLabel('Close')
    ->stickyModalFooter(false),
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

Validate Before Action Modal Renders
FilamentFFilament / ❓┊help
4mo ago
before validate
FilamentFFilament / ❓┊help
2y ago
Modal confirmation before click save button in modal
FilamentFFilament / ❓┊help
15mo ago
How to validate a modal form before extraModalFooterActions runs?
FilamentFFilament / ❓┊help
7mo ago