F
Filament16mo 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
LeandroFerreira16mo 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
JayOP16mo ago
Thanks a lot!
Want results from more Discord servers?
Add your server