Disable entire form - throws error when checking $operation
I want to disable my
I don't want to do it on a field by field basis as this is a fairly large and complex form (also why I don't want a view). Snippet from my resource: But this throws
edit
form when certain criteria are met.I don't want to do it on a field by field basis as this is a fairly large and complex form (also why I don't want a view). Snippet from my resource: But this throws
An attempt was made to evaluate a closure for [Filament\Forms\Form], but [$operation] was unresolvable.
https://flareapp.io/share/17DXjr67
I thought the $operation helper was globally available
Small caveat - I've rushed my dog to the vets 3 times in the last 7 days so I'm a bit emotionally frazzled - I'm sure the answer is blindingly obvious
nblFlare
An attempt was made to evaluate a closure for [Filament\Forms\Form], but [$operation] was unresolvable. - The error occurred at https://f2t.test/admin/quotes/1/edit
Solution:Jump to solution
->disabled(fn (?Quote $record): bool => $record !== null && $record->status == 'final')
3 Replies