Read-only text field.
Please note - this property requires the Editor extension for DataTables.
The full Editor reference documentation is available to registered users of Editor - the information shown below is a summary only. If you already have an Editor license please sign-in, alternatively an Editor license can be purchased on this site, or sign up for the free trial.
This field type adds a read only text field that cannot be modified by the end user to the form.
As this field is read only, it will always contain the value that it is set up with the form is displayed (that is the default,
fields.def for the create form, and the data value for the edit form). If you wish to set a different value, you can do so using the API -
field().val() methods. Read only is in the sense that the end user cannot modify the value only and as such this should not be considered to be a client-side security measure.
Note that the
field().disable() methods can be used to mimic this field type's behaviour with the other field types. The
readonly is designed to be used with fields that are only ever read only and will not accept user input.