Override the submitAction dynamically in the Page class
If you’re in a CreatePage or EditPage, you can control visibility like this:
class CreatePage extends CreateRecord
{
protected static string $resource = PageResource::class;
//add this
public function getFormActions(): array
{
return [
];
}
}
And in your PageForm :
Wizard::make([
...
])
->submitAction(view('filament.submit-button'))
// in resources\views\filament\submit-button.blade.php
<div
x-data
x-transition
>
<x-filament::button
type="submit"
color="primary"
class="fi-btn"
>
Submit
</x-filament::button>
</div>
Top comments (0)