Hide create button in a form with wizard

Hi everyone! I'm using a Wizard in a form when creating a resource. My submit button is at the last step of the wizard, so I need to hide the default button of the form. I was following this documentation: https://filamentphp.com/docs/3.x/panels/resources/creating-records#adding-a-create-action-button-to-the-header And wrote this:
protected function getFormActions(): array
{
return [];
}
protected function getFormActions(): array
{
return [];
}
But still the buttons persists, as in the image. Any tip? Thank you so much!
No description
Solution:
Hi @Vp, got it in the morning. The problem was that I was using the method in the wrong place πŸ˜„ Thank you so much for the tip. For others:...
Jump to solution
3 Replies
Davide Cariola
Davide CariolaOPβ€’7mo ago
Thank you so much, I'll look into it!
Solution
Davide Cariola
Davide Cariolaβ€’7mo ago
Hi @Vp, got it in the morning. The problem was that I was using the method in the wrong place πŸ˜„ Thank you so much for the tip. For others:
//App\Filament\Resources\MyResource\Pages\CreateResource.php
protected function getFormActions(): array
{
return [
$this->getCancelFormAction(),
];
}
//App\Filament\Resources\MyResource\Pages\CreateResource.php
protected function getFormActions(): array
{
return [
$this->getCancelFormAction(),
];
}
this hides every button except the one you choose to show (you can find the methods in the CreateRecord class
Want results from more Discord servers?
Add your server