Toggle menu

helper.utilRemoveAction(fieldName, contextVariables)

Removes any actions from the supplied context that were added by the specified field.

Executed

Server-side only

Arguments

ArgumentTypeDescription
fieldNameString, requiredThe name of the field whose actions should be removed
contextVariablesObject, requiredThe current context. This will always be context

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

Share this page

Facebook icon Twitter icon email icon

Print

print icon