Using Gravity Forms ‘gform_before_resend_notifications’ PHP action

The gform_before_resend_notifications filter is executed before resending notifications from the admin. You may use this to modify the form object. This is especially useful in changing the email subject or message.

Usage

Applies to all forms:

add_filter('gform_before_resend_notifications', 'change_subject', 10, 2);

Applies to a specific form. In this case, form Id 5:

add_filter('gform_before_resend_notifications_5', 'change_subject', 10, 2);

Parameters

  • $form (Form Object) – The form from which the entry value was submitted.
  • $lead_ids (array) – An array of entry ids.

More information

See Gravity Forms Docs: gform_before_resend_notifications

Examples

Change the subject line of the email

This example changes the subject line of the email.

add_filter('gform_before_resend_notifications', 'change_subject', 10, 2);

function change_subject($form, $lead_ids) {
    $original_subject = $form['notification']['subject'];
    $form['notification']['subject'] = 'Resending - ' . $original_subject;
    return $form;
}

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

Source Code: This filter is located in GFForms::resend_notifications() in gravityforms.php.