how can i make a textfield read only in grails.
I tried with readonly attribute on textfield as below but its not working.
<g:textField name="fname" size="14px" id="fname" value="${patient.fname}" readonly="true">
If you use disabled="true" the value will not actually be submitted in the form, so the <g:field/>
tag should be used.
For example,
<g:field type="text" name="name" readonly="readonly" value="${instance.?name}"/>
More info here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With