Removes any actions from the supplied context that were added by the specified field.
Executed
Server-side only
Arguments
Argument | Type | Description |
---|---|---|
fieldName | String, required | The name of the field whose actions should be removed |
contextVariables | Object, required | The current context. This will always be |
Example
This example is used in a script action field. If the radio-group field (called RADIO) has the value "noemail" the email action field (called EMAIL) is removed.
The script action containing this function must be placed above any action fields that need to be removed as action fields are executed in the order they are placed on the form.
function (helper, processor, props, context) {
if (helper.getFieldValue("RADIO") == "noemail" ){
helper.utilRemoveAction("EMAIL", context);
}
return true;
}
Last modified on 2 May 2024