Livewire component in Action modalContent? Help
Hello, im am learning FilamentPHP and for excersise i am building simple task management application.
I would like to render task informations in modal.
I would like to add comments option for tasks.
I would like to render modal af6er adding comment.
I would like to have some buttons to change task status, assign followers, send email, add note, show notes etc.
I saw somewhere that only one form can be on Action, so I created livewire component and rendered it in modal.that component has HasSchema, HasInfolists, HasForms trait and interface.
In livewire component I added simple form with one field "comment" and created submit method with dd() inside.
When I submit comment, dd is not triggered, but action modal is closed. I need action modal to stay opened until I close it.
I tried adding $action->halt(); but without success.
Is there an option to have Livewire component inside Action (modalContent() method) and option to that Livewire component has multiple form instances?
9 Replies
Please share some code.
This is table with Action having blade view:

This is Action Blade view, only Livewire component is here:

This is Livewire component:

And this is Livewire component view:

What I would like is have a form on Livewire component that uses Filament schema, and when saving form to render component but NOT close action of Filament.
dd() is never triggered here
Thanks, but I need to handle 2 or more forms so this will not be good way
I think each form could be an action
https://filamentphp.com/docs/4.x/actions/modals/#adding-an-action-to-custom-modal-content
You can also work with replaceMountedAction
https://filamentphp.com/docs/4.x/components/action/#chaining-actions