Invokes a custom field function defined within a field's HTMLSkel.
The function must exist with the name specified, any arguments needed by the function should be supplied after the function name. Any value returned by the invoked function will be returned by this function.
Arguments
Argument | Type | Description |
---|---|---|
fieldName | String, required | The name of the field whose custom function is to be invoked |
customFnName | String, required | The name of the function to invoke |
arg1 | Any, optional | Additional function parameter |
arg2 | Any, optional | Additional function parameter |
argN | Any, optional | Additional function parameter |
Returns
Any
Example
In this example a handler has been added to a text field, which invokes the custom "search" function of the location picker field, 'LOCATION', whenever the value of the text field changes. The value of the text field is passed to the location picker's search.
function (helper, fieldName, value, valid, eventName) {
if (eventName == 'CHANGE' && valid) {
helper.invokeCustomFieldFn('LOCATION', 'search', value);
}
}
Last modified on September 13, 2023