Gform update $ENTRY COLUMN

(Created page with "__NOTOC__ == Description == Use this action hook to perform logic when entries' basic information is updated. == Usage == <pre class="brush:php"> <?php add_action("gform_update...")
(One intermediate revision not shown)
Line 13: Line 13:
== Parameters ==  
== Parameters ==  
;$entry_id
;$entry_id
-
:(int) Currenty entry ID
+
:(int) Current entry ID
;$property_value
;$property_value
Line 37: Line 37:
?>
?>
</pre>
</pre>
 +
 +
== Placement ==
 +
 +
This code should be placed in the '''functions.php''' file of your active theme.
== Source Code ==
== Source Code ==
This filter is located in ''forms_model.php''
This filter is located in ''forms_model.php''

Revision as of 01:52, 8 November 2011

Description

Use this action hook to perform logic when entries' basic information is updated.

Usage

<?php
add_action("gform_update_status", "status_changed", 10, 3);
?>

Parameters

$entry_id
(int) Current entry ID
$property_value
(mixed) New value of the entry's property
$previous_value
(mixed) Previous value of the entry's property

Examples

This example automatically deletes entries that are marked as Spam


<?php
add_filter("gform_update_status", "delete_spam", 10, 3);
function delete_spam($entry_id, $property_value, $previous_value){
    if($property_value == "spam"){
        RGFormsModel::delete_lead($entry_id);
    }
}

?>

Placement

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

Source Code

This filter is located in forms_model.php

Search the Documentation