F
Filament7mo ago
Groli

Is it possible to create new Action Modal anywhere in code, if so, how?

I want to prompt user if the submitted data is missing for example som keyword required with a modal. Can it be done?
1 Reply
Tetracyclic
Tetracyclic7mo ago
You can display an action by calling mountAction on the Livewire object and passing it the ID of the action and optionally any arguments it needs. https://github.com/filamentphp/filament/blob/5179891d776aa2561d52396492d4d316ddee6264/packages/actions/src/Concerns/InteractsWithActions.php#L161 It should work to set the action up on the form in the same way you would if manually embedding it in a Livewire component: https://filamentphp.com/docs/3.x/actions/adding-an-action-to-a-livewire-component#adding-the-action You may need to use a View component on the form to embed the {{ $this->customAction }} call in the template.
Want results from more Discord servers?
Add your server