How can I conditionally disable a custom input field?
If I do this:
$isDisabled()
always returns true and the field is disabled, either if I use:
or
2 Replies
try to use disabledOn() function
you can read this furtheer here:- https://github.com/filamentphp/filament/discussions/2739
You can callback a function in this also
GitHub
How to disable field in Edit Form of simple resource · filamentphp ...
I have created a simple resource and want to disable a field only in the edit form. I have tried the following and it is not working. use Filament\Resources\Pages\Page; use Filament\Resources\Pages...
The issue is in the view file, I have to conditionally assign a value to the disabled attribute like this:
:disabled=$isDisabled()
The problem is, that $isDisabled()
is always true for some reason, even if i try
or
There is no way to conditionally disable my custom field, it stays on whatever is hard coded in the view file, can't pass data to it to disable it (can pass other data like state or placeholder etc.)