MobileGlideForm (g_form) - setLabel(String fieldName, String label)

Sets the form label text.

Table 1. Parameters
Name Type Description
fieldName String The field name.
label String The field label text.
Table 2. Returns
TypeDescription
void

This example changes the comments label.

if (g_user.hasRole('itil')) {
      var oldLabel = g_form.getLabel('comments');
      g_form.setLabel('comments', oldLabel + ' (Customer visible)');
      }