F
Filament5mo ago
Zen

Action::make('update_transaction)->form([])->disabledForm() does not disable the submit button

In my transaction resource, I would allow wallet holder to submit the deposit request and update value unless the transaction is confirmed by admin. Once it is confirmed, the form should be disabled so, the holder cannot update the value. In my program, I used disabledForm() it disables all fields but not submit button. Please advise how I could solve this issue.
No description
No description
2 Replies
bennett
bennett4mo ago
Also wondering how this can be achieved..
LeandroFerreira
LeandroFerreira4mo ago
->modalSubmitAction(function (StaticAction $action, $record) {
return $action->visible(fn (): bool => $record->confirmed);
})
->modalSubmitAction(function (StaticAction $action, $record) {
return $action->visible(fn (): bool => $record->confirmed);
})