gform_post_form_views_deleted

Description

The gform_post_form_views_deleted action is triggered when a form view count has been reset to zero, allowing further actions to be performed.

Usage

add_action( 'gform_post_form_views_deleted', 'my_function', 10, 1 );

Parameters

ParameterTypeDescription
$form_idintThe ID of the form that the view count is being reset on.

Examples

Perform an action after the form view count is reset.

add_action( 'gform_post_form_views_deleted', 'my_function', 10, 1 );
function my_function( $form_id ) {
	// Perform action after the form view count has been reset to zero.
}

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.