gform_before_resend_notifications

gform_before_resend_notifications

DescriptionUsageParametersExamplesPlacementSource Code

Description
This 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
1add_filter( 'gform_before_resend_notifications', 'change_subject', 10, 2 );
Applies to a specific form. In this case, form Id 5.
1add_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.

Examples
This example changes the subject line of the email.
123456add_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

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注