Toggle menu

helper.showFieldOptional(fieldName [, optionalMarker ])

Displays the "optional" markup of a field.

This function can also set the marker text used by the field.

Note that this function does not change the field's validation or required state, it only displays a marker next to the label. You will need to write an accompanying validation function to change the field's requiredness.

Executed

Client-side

Arguments

ArgumentTypeDescription
fieldNameString, requiredThe name of the field to show the marker for
optionalMarkerString, optionalThe marker to display next to the field's label. Default: (optional)

Example

function(helper) {
    helper.showFieldOptional('FIELD9', ' This field is optional');
}

Last modified on March 06, 2020

Share this page

Facebook icon Twitter icon email icon

Print

print icon