F
Filament11mo ago
Jay

Disable "Save changes" button

Is there a way to disable the "Save changes" button in the edit page? Based on certain conditions set by me.
2 Replies
LeandroFerreira
LeandroFerreira11mo ago
yes, EditPage.php
protected function getSaveFormAction(): \Filament\Actions\Action
{
return parent::getSaveFormAction()
->disabled(function (): bool {

//$this->data
//$this->record
return ...
});
}
protected function getSaveFormAction(): \Filament\Actions\Action
{
return parent::getSaveFormAction()
->disabled(function (): bool {

//$this->data
//$this->record
return ...
});
}
Jay
Jay11mo ago
Thanks a lot!