BrightLeaf Digital Code Snippet Library
Check out our growing library of code snippets for Gravity Forms!
Gravity Forms Advanced Conditional Logic Runtime Engine
GOAL
Provides the "engine" that makes advanced conditional logic work on your live forms.
It handles both real-time showing/hiding of fields in the browser and secure enforcement
of those rules when the form is submitted.
CONFIGURATION REQUIRED
- Must be active alongside the "Gravity Forms Advanced Conditional Logic Editor UI" snippet.
- Requires Gravity Forms to be installed and active.
USAGE
1. Ensure this snippet is active on your site.
2. There are no settings to configure within this file.
3. Once active, it will automatically look for any "Advanced Conditional Groups" you have
configured on your form fields using the Editor UI snippet.
HOW IT WORKS
- REAL-TIME SHOW/HIDE: Instantly evaluates advanced logic groups to show or hide fields as users
fill out the form. Uses a "pre-hide" technique to prevent fields from "flicker" on page load.
- SECURE ENFORCEMENT: Runs on the server during submission. If a field is hidden by advanced logic,
its value is cleared to prevent unnecessary data storage and bypass validation for hidden fields.
- NATIVE COMPATIBILITY: Respects Gravity Forms' built-in conditional logic.
NOTES
- If advanced logic isn't working, verify BOTH this Engine snippet and the Editor UI snippet are active.
This code is best installed directly on your site using the Code Snippets plugin.
Loading...
Review this entry
You must be logged in to post a comment.