A function used to dynamically load a third party JavaScript file.
This is also used by the form runtime to load jQuery and jQueryUI if not already present.
Executed
Client-side and server-side.
Arguments
Argument | Type | Description |
---|---|---|
fileName | String, required | The URL to the JavaScript file |
cb | Function, optional | A function to execute after loading the file |
Example
Included in a page init function this would make an additional JavaScript library available to your form.
function(helper, fieldName, value, valid, eventName) {
helper.utilLoadScript("https://cdnjs.cloudflare.com/ajax/libs/chosen/1.6.2/chosen.jquery.min.js", function() {
helper.setVariable("scriptLoaded", "OK");
});
}
Last modified on March 06, 2020