Registers a custom function for a specified field.
A custom function is always called with a reference to the helper object as the first parameter, any additional parameters supplied in the invoke call are also supplied.
Arguments
Argument | Type | description |
---|---|---|
fieldName | String, required | The name of the field |
customFnName | String, required | The name of the custom function |
customFn | Function, required | The custom function |
Example
This custom field function is found in the HTMLSkel of the Location Picker field type.
helper.registerCustomFieldFn( "<%=Props["FIELD"]["NAME"]%>", "showMap", function() {
<% if ( mapButtonLabel !== "" ) { %>
<%=Props["FIELDID"]%>locationPicker.showMap( "<%=Props["FIELDID"]%>" );
<% } %>
});
Last modified on March 06, 2020