bookmark_bordergform_conditional_logic_operators

Description

This JavaScript hook can be used to override the available conditional logic operators.

Usage

<script>
gform.addFilter('gform_conditional_logic_operators', function (operators, objectType, fieldId) {
    // do stuff
    return $operators;
});
</script>

Parameters

  • operators JavaScript Object

    The current operators. e.g.

    {"is":"is","isnot":"isNot", ">":"greaterThan", "<":"lessThan", "contains":"contains", "starts_with":"startsWith", "ends_with":"endsWith"}&#91;/javascript&#93;</p></li>
    <li><p><strong>objectType</strong> string
    
    The current conditional logic object type. <em>Possible values: page, field, next_button, confirmation, notification, or feed_condition.</em></p></li>
    <li><p><strong>fieldId</strong> integer
    
    The ID of the current field.</p></li>
    </ul>
    
    </div>
    
    <h2>Examples</h2>
    
    <p>The following example shows how you can specify the available operators.
    
    
    gform.addFilter('gform_conditional_logic_operators', function (operators, objectType, fieldId) {
        operators = {'>': 'greaterThan'};
    
        return operators;
    });
    

    Source Code

    This hook is located in GetRuleOperators() in js/form_admin.js.