gform_delete_entries

Fires when you delete entries for a specific form.

Description

do_action( 'gform_delete_entries', (int) $form_id, (string) $status ); 

Parameters (2)

0. $form_id (int)
The form ID to specify from which form to delete entries
1. $status (string)
Allows you to set the form entries to a deleted status

Usage

To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'gform_delete_entries', $form_id, $status ); 
The following example is for adding a hook callback.
  1. // define the gform_delete_entries callback 
  2. function action_gform_delete_entries( $form_id, $status ) { 
  3. // make action magic happen here... 
  4. }; 
  5.  
  6. // add the action 
  7. add_action( 'gform_delete_entries', 'action_gform_delete_entries', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( 'gform_delete_entries', 'action_gform_delete_entries', 10, 2 ); 

Defined (1)

The action is defined in the following location(s).

/forms_model.php  
  1. do_action( 'gform_delete_entries', $form_id, $status );