F
Filament3mo ago
pratik

Any way to make checkbox readonly but not disabled ?

Checkbox::make('done')
->inlineLabel();
Checkbox::make('done')
->inlineLabel();
Solution:
I think you want it disabled but that makes it an ignored field, right? as a solution use ->dehydrated() as in the docs: Toggle::make('is_admin') ->disabled()...
Jump to solution
3 Replies
SuperUserDo
SuperUserDo3mo ago
Have you tried to chain ->disabled() ?
Solution
Mohamed Ayaou
Mohamed Ayaou3mo ago
I think you want it disabled but that makes it an ignored field, right? as a solution use ->dehydrated() as in the docs: Toggle::make('is_admin') ->disabled() ->dehydrated()
pratik
pratikOP3mo ago
Thank you, I missed dehydrated. 😁

Did you find this page helpful?