Description
The gform_delete_entries action is triggered when entries are deleted in Gravity Forms, allowing further actions to be performed.
Usage
add_action( 'gform_delete_entries', 'my_function', 10, 2 );
Parameters
| Parameter | Type | Description |
|---|---|---|
$form_id | The ID of the form that an entry is being deleted from. | |
$status | The status of the deleted entry. |
Examples
Handle an entry being deleted.
function my_function( $form_id, $status ) {
echo 'Entry with status' . $status . 'is being deleted from form ' . $form_id;
}
add_action( 'gform_delete_entries', 'my_function', 10, 2 );
Placement
This code can be used in the functions.php file of the active theme, a custom functions plugin, a custom add-on, or with a code snippets plugin.
See also the PHP section in this article: Where Do I Put This Code?
Source Code
This action hook is located in forms_model.php.