GlideForm - setReadOnly(String fieldName, Boolean readOnly)

Makes the specified field read only or editable.

Whenever possible, use a UI policy instead of this method.

Note: The function name setReadonly() also works.

To make a mandatory field read-only, you must first remove the mandatory requirement for that field by using the setMandatory() method.

Table 1. Parameters
Name Type Description
fieldName String Name of the field.
readOnly Boolean When true makes the field read only. When false makes the field editable.
Table 2. Returns
Type Description
void