gform_autoresponder_email

gform_autoresponder_email

DescriptionUsageParametersExamplesSource Code

Description
This filter is executed before sending the user notification email. It can be used to route the notification to a different email address.

This hook has been deprecated in v.1.7. Please use gform_notification instead.

Usage
Applies to all forms
1add_filter( 'gform_autoresponder_email', 'change_notification_email', 10, 2 );
Applies to a specific form. In this case, form Id 5
1add_filter( 'gform_autoresponder_email_5', 'change_notification_email', 10, 2 );

Parameters

$email string
The email address to be filtered.

$form Form Object
The current form.

Examples
This example uses the gform_autoresponder_email filter to send the user notification to a test email address
12345678910add_filter( 'gform_autoresponder_email', 'change_notification_email', 10, 2 );function change_notification_email( $email, $form ) {     //applying notification routing to form Id 2    if ( $form['id'] != 2 )        return $email;     //creating email list from fields 2 and 3.    return $_POST['input_2'] . ',' . $_POST['input_3'];}
Source Code
This filter is located in GFCommon::prepare_user_notification() in form_display.php

发表回复

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