gform_post_update_form_meta

Description

Fires after form meta has been updated for any form.

Usage

The following would apply to all forms:

add_action( 'gform_post_update_form_meta', 'your_function_name', 10, 3 );

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

add_action( 'gform_post_update_form_meta_1', 'your_function_name', 10, 3 );

Parameters

  • $form_meta Form Object

    The current form data.

  • $form_id int

    The form id.

  • $meta_name string

    The name of the meta updated. Possible values: display_meta (the form fields and settings), notifications, or confirmations

Examples

add_action( 'gform_post_update_form_meta', 'update_data', 10, 3 );
function update_data( $form_meta, $form_id, $meta_name ) {
	GFCommon::send_email( '[email protected]', '[email protected]', '', '', 'Form ' . $form_id, 'Form Updated at ' . date( 'Y-m-d H:i:s' ) );
}

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?

Since

This filter was added in Gravity Forms version 1.9.

Source Code

This filter is located in GFFormsModel::update_form_meta() in forms_model.php.