Toggle menu

helper.registerCustomFieldFn(fieldName, customFnName, customFn)

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

ArgumentTypedescription
fieldNameString, requiredThe name of the field
customFnNameString, requiredThe name of the custom function
customFnFunction, requiredThe 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

Share this page

Facebook icon Twitter icon email icon

Print

print icon