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:Jump to 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
.4 Replies
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
.and what was the solution, for it does not work dehydrated
TextInput::make('country')->disabled()->dehydrated()
Thanks bro