Disable createAnother in form footer

I'm in the bottom of the form, i want to hide the create another button, im trying to find it in the docs but i dont find it. i've found this, but seems isnt what i want, cuz stays the same. : (file app/Filament/Resources/FormResource/Pages/ListForms.php)
protected function getHeaderActions(): array
{
return [
Actions\CreateAction::make()->createAnother(false),
];
}
protected function getHeaderActions(): array
{
return [
Actions\CreateAction::make()->createAnother(false),
];
}
i also tried to create a fn called getFooterActions but nah
No description
4 Replies
Ehsan
Ehsan14mo ago
Use CreateAction::make()->disableCreateAnother()
ericmp #2
ericmp #2OP14mo ago
'disableCreateAnother' is deprecated i had to do this: and not in the ListForms, but in the CreateForms file
protected function getFormActions(): array
{
return [
$this->getSubmitFormAction(),
$this->getCancelFormAction(),
];
}
protected function getFormActions(): array
{
return [
$this->getSubmitFormAction(),
$this->getCancelFormAction(),
];
}
Ehsan
Ehsan14mo ago
You can also use protected static bool $canCreateAnother = false; in the create page
ericmp #2
ericmp #2OP14mo ago
ohh ill try that too oh yeah nice thanks

Did you find this page helpful?