gform_frontend_feed_deactivated

Description

The “gform_frontend_feed_deactivated” JavaScript action in Gravity Forms fires after the conditional logic on the form has been evaluated and the feed has become inactive, allowing further actions to be performed.

Usage

The following would apply to all forms:

gform.addAction('gform_frontend_feed_deactivated', function (feeds, formId) 
  {
	  //do something
  }
);

To target a specific form, append the form id to the hook name. (format: gform_frontend_feed_deactivated_FORMID)

gform.addAction('gform_frontend_feed_deactivated_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_deactivated)

gform.addAction('gform_gravityformsstripe_frontend_feed_deactivated', 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_deactivated_FORMID)

gform.addAction('gform_gravityformsstripe_frontend_feed_deactivated_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.deactivateFeed() includes/addon/js/gaddon_frontend.js