SaveFormAction works in footer but not header

How do I get the save button to work when in a header?
class EditVacancy extends EditRecord
{
protected static string $resource = VacancyResource::class;

protected function getHeaderActions(): array
{
return [
$this->getSaveFormAction(), // does not run
];
}

protected function getFormActions(): array
{
return [
$this->getSaveFormAction(),
];
}
}
class EditVacancy extends EditRecord
{
protected static string $resource = VacancyResource::class;

protected function getHeaderActions(): array
{
return [
$this->getSaveFormAction(), // does not run
];
}

protected function getFormActions(): array
{
return [
$this->getSaveFormAction(),
];
}
}
Solution:
try ```php $this->getSaveFormAction() ->submit(null) ->action('save')...
Jump to solution
2 Replies
Solution
LeandroFerreira
LeandroFerreira16mo ago
try
$this->getSaveFormAction()
->submit(null)
->action('save')
$this->getSaveFormAction()
->submit(null)
->action('save')
Ric Le Poidevin
Ric Le PoidevinOP16mo ago
Amazing, thank you! I think I had something like that. Still getting my head around how it all works, but that fixed my problem. Thanks!

Did you find this page helpful?