gform_post_form_activated

Description

The gform_post_form_activated action in Gravity Forms is triggered after an inactive form is marked as active, allowing further actions to be performed.

Usage

add_action( 'gform_post_form_activated', 'my_function', 10, 2 );

Parameters

ParameterTypeDescription
$form_idintThe ID of the form that is being marked as active.

Examples

Perform an action after a form has been activated.

add_action( 'gform_post_form_activated', 'my_post_form_activated_func', 10);

function my_post_form_activated_func( $form_id ) {
	// perform action after a form has been activated
}

Placement

This code can be used in the functions.php file of the active theme, a custom functions plugin, a custom add-on, or with a code snippets plugin.

See also the PHP section in this article: Where Do I Put This Code?

Source Code

This action hook is located in forms_model.php.