how to, livewire form save button to header in filament custom page
Hi,
As I summarized in the title, I have a livewire form and I have a submit button in the form. I want to move this submit button to the header (as seen in the picture), how can I do it?
8 Replies
How have you added the submit button, did you see:
I believe the original v2 principle should work:
https://filamentphp.com/docs/2.x/forms/getting-started#preparing-your-livewire-component
@toeknee i don't have any problem with form submit, or button functionality. If you look to screen shot you can see, i want to move button to page header. But it's livewire component and button must be inside of form. But i'm asking, is there anyway to move header
That'd move it outside the form and make it non-functional. I'm trying to find a solution to the same problem. 😅
Try to make a header action with dispatch event for save form. And in component need to add this event listener.
Solution
For example. Header action:
Then in component:
Alternatively, the one and only Dan Harrin just shared a solution to putting the submit button into header actions over here: https://discord.com/channels/883083792112300104/1166754657310355456/1166766327072051241
This is acceptable and working good, thanks for help.