gform_post_add_entry

Description

This hook fires after an entry has been added via GFAPI::add_entry().

Usage

add_action( 'gform_post_add_entry', 'your_function_name', 10, 2 );

Parameters

ParameterTypeDescription
$entryEntry ObjectThe entry after being added.
$formForm ObjectThe form object.

Example

add_action( 'gform_post_add_entry', 'log_post_add_entry', 10, 2 );

function log_post_add_entry( $entry, $form ) {
    GFCommon::log_debug( 'gform_post_add_entry: entry => ' . print_r( $entry, true ) );
}

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 is located in GFAPI::add_entry() in includes/api.php.