Displays the "required" markup of a field.
This function can also set the marker used by the field and change the title used in the field's markup. The title is often used to style the marker (for example, our standard themes look for
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
Argument | Type | Description |
---|---|---|
fieldName | String, required | The name of the field to show the marker for |
requiredMarker | String, optional | The marker to display next to the field's label. Default: * |
titleText | String, optional | The title text used in the field markup. Default: required |
Example
This example will display an exclamation mark next to the label of FIELD9.
function(helper) {
helper.showFieldRequired('FIELD9', '!');
}
Last modified on March 06, 2020