Alex (Talk | contribs)
(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...")
Newer edit →
(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...")
Newer edit →
Revision as of 15:31, 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) Currenty 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