gform_post_update_entry_property

gform_post_update_entry_property

DescriptionUsageParametersExamplesPlacementSinceSource Code

Description
Runs after an entry property is updated.
Usage
add_action( 'gform_post_update_entry_property','your_function_name', 10, 4 );

Parameters

$entry_id int
The current entry ID.

$property_name string
The property that was updated.

$property_value string
The new value of the property that was updated.

$previous_value string
The previous property value before the update.

Examples
add_action( 'gform_post_update_entry_property','after_entry_property_updated', 10, 4 );
function after_entry_property_updated ( $entry_id, $property_name, $property_value, $previous_value ){
//do not allow entries to be trashed
if ( $property_name == 'status' && $property_value == 'trash' ){
GFFormsModel::update_entry_property( $entry_id, 'status', 'active' );
}
}

Placement
This code should be placed in the functions.php file of your active theme.
Since
This filter was added in Gravity Forms version 2.3.3.9.
Source Code
This filter is located in GFFormsModel::update_entry_property() in forms_model.php.

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注