(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...") |
(→Parameters) |
||
| Line 13: | Line 13: | ||
== Parameters == | == Parameters == | ||
;$entry_id | ;$entry_id | ||
| - | :(int) | + | :(int) Current entry ID |
;$property_value | ;$property_value | ||
Revision as of 15:33, 2 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);
}
}
?>
Source Code
This filter is located in forms_model.php