The gform/conditionalLogic/applyRules/start
event is triggered at the beginning of the conditional logic evaluation process. It allows developers to hook into the logic flow just before any rules are applied. This is especially useful for conversational forms, where timing and visibility of fields are critical to maintaining a smooth, interactive experience.
Usage
document.addEventListener( 'gform/conditionalLogic/applyRules/start', handleApplyRulesStart );
const handleApplyRulesStart = ( event ) => {
// do whatever you need to here
};
Parameters
Parameter | Type | Description |
---|---|---|
formId | number | The ID of the form where conditional logic was evaluated. |
fields | array | An array of field IDs that are subject to the conditional logic evaluation. |
isInit | boolean | Indicates if the evaluation is part of the form’s initial setup (true) or a result of user interaction (false). |
Since
This event was added in Gravity Forms v2.7.5.1
Location
This event is located in /assets/js/conditional_logic.js