Blog

Dynamic Field Labels

If you want some dynamic field labels, here is a helpful script.  This hasn't always worked in the past (Fuji), but works now in Istanbul Service Portal.

function onChange(control, oldValue, newValue, isLoading) {
if (isLoading) {
return;
}
if (g_form.getValue('request_type') == 'Create') {
g_form.setLabelOf('phone', 'New Phone');
g_form.setLabelOf('address', 'New Address');
}
else {
g_form.setLabelOf('phone', 'Phone');
g_form.setLabelOf('address', 'Address');
}
}