Description
The “gform_frontend_feed_activated” JavaScript action in Gravity Forms fires after the conditional logic on the form has been evaluated and the feed has been found to be active, allowing further actions to be performed.
Usage
The following would apply to all forms:
gform.addAction('gform_frontend_feed_activated', function (feeds, formId) { //do something } );
To target a specific form, append the form id to the hook name. (format: gform_frontend_feed_activated_FORMID)
gform.addAction('gform_frontend_feed_activated_1', function (feeds, formId) { //do something } );
To target a specific add-on, include the slug for the add-on after the “gform” text (format: gform_SLUG_frontend_feed_activated)
gform.addAction('gform_gravityformsstripe_frontend_feed_activated', function (feeds, formId) { //do something } );
To target a specific form and add-on, append the form id to the hook name, and include the slug for the add-on after the “gform” text (format: gform_SLUG_frontend_feed_activated_FORMID)
gform.addAction('gform_gravityformsstripe_frontend_feed_activated_1', function (feeds, formId) { //do something } );
Parameters
- $feeds Feed Object
An array of feed objects.
-
$formId int
The form id.
Placement
Your code snippet can be placed in a HTML field on your form or in a theme custom JavaScript file.
Since
This action was added in Gravity Forms 2.4
Source Code
This filter is located in GFFrontendFeeds.activateFeed() includes/addon/js/gaddon_frontend.js