March 2017
Beginner
358 pages
9h 51m
English
Controlling whether a user can modify a field value, as well as whether a field value is required, can be accomplished using two methods of the GlideForm (g_form) API. Respectively: setReadOnly(), and setMandatory().
Both setReadOnly() and setMandatory() accept two arguments: The field name, and a boolean value indicating whether the field should be mandatory/read-only.
In the following example, we set the business service field to read-only, and the configuration item field to mandatory:
g_form.setReadOnly('business_service', true); g_form.setMandatory('cmdb_ci', true);
Read now
Unlock full access