The script action field type lets you write a JavaScript function that is executed on the server before any site template/framework code. For a more detailed look at the order actions are processed in see the The Form Lifecycle: Control and Action Processing reference article.
All of the helper library functions are available. Form Action Fields and Scripted Actions in the Knowledge Base has examples of scripted actions.
Properties
Label | Description | Type Name |
---|---|---|
Summary | A short description of what the field does, displayed in the forms designer to help identify it | SUMMARY |
Action function | The JavaScript function that is executed server-side to perform the required action. The Helper Library functions are available for use in this function, including ones that enable use of the iCM API. This very simple example will cause a confirmation message to be displayed:function( helper, processor, props, context ) { | ACTIONFUNC |
Stop Processing on Error | If true, and an error is encountered, further action fields on the form won't be processed. See The Form Lifecycle: Control and Action Processing for more information | STOPPROCESSINGONERROR |
Documentation | Add documentation to your field to help explain any complex functionality to future users. You might include information on what the field does and how it relates to other fields on the form. Notes added here are only ever visible in the Forms Designer, they can be searched for, viewed and downloaded from the action panel. See Common Field Properties for an example | DOCUMENTATION |
Action Results
The following can be accessed using .utilGetActionResults once the action has been processed.
"FIELDNAME": {
"success": "true"
}
Last modified on July 08, 2022