F
Filamentβ€’5mo ago
dusano

Open Modal after/before Creating record

Hi there, Is there a way to open a modal after or before a record is persisted in the database? For example, I'd like to trigger a custom modal either right before saving or immediately after the record is created/updated. Has anyone implemented something like this with Filament actions or hooks?
Solution:
Leandro Ferreira (@leandrocfe)
πŸ’‘ Filament Tip: If you want to enhance the Create Form by adding a confirmation modal before submission, use the following code snippet πŸ‘‡
From Leandro Ferreira (@leandrocfe)
X
Jump to solution
4 Replies
Solution
LeandroFerreira
LeandroFerreiraβ€’5mo ago
Leandro Ferreira (@leandrocfe)
πŸ’‘ Filament Tip: If you want to enhance the Create Form by adding a confirmation modal before submission, use the following code snippet πŸ‘‡
From Leandro Ferreira (@leandrocfe)
X
dusano
dusanoOPβ€’5mo ago
Nice one, thanks. Is there a way to pass data to modal?
LeandroFerreira
LeandroFerreiraβ€’5mo ago
I think so.. try ty inject array $data or $livewire->data
dusano
dusanoOPβ€’5mo ago
Awesome! Thanks @LeandroFerreira

Did you find this page helpful?