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?
Ekran_goruntusu_2023-10-18_173318.png
Solution
For example. Header action:
Action::make('saveForm')
    ->action(function () {
        $this->dispatch('saveFormData');
}),

Then in component:
#[On('saveFormData')]
public function saveFormData()
{
    ## Create record or something;
    dd($this->form->getState());
}
Was this page helpful?