JavaScript
Articles
gform.utils
The gform.utils object in Gravity Forms provides a collection of utility functions and modules to assist developers in performing common tasks such as DOM manipulation, data processing, browser compatibility, etc.
gform.adminUtils
The gform.adminUtils object provides utility functions commonly used in the WordPress admin. These utilities can help handle unsaved changes warnings and extract query parameters from the URL.
gform/conditionalLogic/applyRules/start
The gform/conditionalLogic/applyRules/start event allows you to run custom logic right before conditional rules are applied. It’s useful for prepping UI changes, showing loaders, or managing field state in conversational forms.
gform/conditionalLogic/applyRules/end
The gform/conditionalLogic/applyRules/end event allows you to react after conditional logic is applied. Use it to trigger animations, restore inputs, or handle field visibility updates in conversational forms.
gform/post_render
The gform/post_render event can be used to initialize scripts when a form loads. It is a direct replacement for gform_post_render.
gform/theme/scripts_loaded
The gform/theme/scripts_loaded event can be used to initialize scripts that depend on Gravity Forms front-end form scripts, including the JavaScript gform object.
gform/submission/pre_submission
The gform/submission/pre_submission filter should be used to perform custom actions between a form button (e.g. submit, next, previous) being clicked and the request being posted to the server.
gform/ajax/post_ajax_submission
This filter allows developers to customize or modify the response data, including additional information, custom messages, or altered submission details.
gform/products/product_field_changed
This JavaScript event is triggered when any price changes.
gform/post_init
This event is intended for use by add-ons that depend on core scripts. It fires once per form and provides the form ID as a parameter.