gform_post_form_restored

Description

The gform_post_form_restored action in Gravity Forms is triggered after a form is restored from the trash, allowing further actions to be performed.

Usage

add_action( 'gform_post_form_restored', 'my_function', 10 );

Parameters

ParameterTypeDescription
$form_idintThe ID of the form being restored.

Examples

Perform an action after a form is restored.

add_action( 'gform_post_form_restored', 'my_post_form_restored_func', 10 );

function my_post_form_restored_func( $form_id ) {
	// perform action after a form has been restored
}

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.