gform_entry_pre_update

Description

Filters the entry before it is updated by an add-on or the API.

When editing entries in the admin, this filter is only used when updating payment information.

Usage

add_filter( 'gform_entry_pre_update', 'your_function_name', 10, 2 );

Parameters

Example

add_filter( 'gform_entry_pre_update', 'change_entry', 10, 2 );
function change_entry( $entry, $original_entry ){
if ( rgar( $entry, '1.3' ) == 'Rocketgenius' || rgar( $entry, '1.6' ) == 'Rocketgenius') {
$entry['2'] = 'dana@rocketgenius.com';
}
return $entry;
}

Placement

This code should be placed in the functions.php file of your active theme.

Since

This filter was added in Gravity Forms version 1.8.8.

Source Code

This filter is located in GFAPI::update_entry() in includes/api.php and
GF_Forms_Model_Legacy::update_entry() in includes/legacy/forms_model_legacy.php.