F
Filament3mo ago
morty

Make field read-only but also styled as if it was disabled?

Is this possible? ->readOnly() is what I want functionally but ->disabled() is what I want visually. If I use ->disabled() then the field is not submitted with the form, but if I use ->readOnly() then the field is still focusable and looks active.
Solution:
Never mind, I read the documentation for the read only field but the answer was on the documentation for the disabled field. Solution was to use ->dehydrated.
Jump to solution
4 Replies
Solution
morty
morty3mo ago
Never mind, I read the documentation for the read only field but the answer was on the documentation for the disabled field. Solution was to use ->dehydrated.
mile4841
mile48412mo ago
and what was the solution, for it does not work dehydrated
morty
morty2mo ago
TextInput::make('country')->disabled()->dehydrated()
mile4841
mile48412mo ago
Thanks bro
Want results from more Discord servers?
Add your server