GlideForm - setLabelOf(String fieldName, String label)

Sets the plain text value of the field label.

Note: This method is not supported by Service Catalog.
Table 1. Parameters
Name Type Description
fieldName String The field name.
label String The field text label.
Table 2. Returns
Type Description

if (g_user.hasRole('itil')) {
    var oldLabel = g_form.getLabelOf('comments');
    g_form.setLabelOf('comments', oldLabel + ' (Customer visible)');