This documentation page is for Quform version 1 and may not be applicable for Quform 2 click here to visit the documentation for Quform 2.
This guide will show you how to make the autoreply email content contain the same data as the default notifcation email, i.e. containing all form data.
Step 1
Get the unique ID of the form, see Finding the form ID.
Step 2
Add the following code to the wp-content/themes/YOUR_THEME/functions.php file (or create a plugin for it).
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 | function my_customize_autoreply($mailer, $form, $attachments) { ob_start(); include IPHORM_INCLUDES_DIR . '/emails/email-html.php'; $emailHTML = ob_get_clean(); ob_start(); include IPHORM_INCLUDES_DIR . '/emails/email-plain.php'; $emailPlain = ob_get_clean(); $mailer->MsgHTML($emailHTML); $mailer->AltBody = $emailPlain; // You must return the $mailer object return $mailer; } add_filter('iphorm_pre_send_autoreply_email_1', 'my_customize_autoreply', 10, 3); |
function my_customize_autoreply($mailer, $form, $attachments) { ob_start(); include IPHORM_INCLUDES_DIR . '/emails/email-html.php'; $emailHTML = ob_get_clean(); ob_start(); include IPHORM_INCLUDES_DIR . '/emails/email-plain.php'; $emailPlain = ob_get_clean(); $mailer->MsgHTML($emailHTML); $mailer->AltBody = $emailPlain; // You must return the $mailer object return $mailer; } add_filter('iphorm_pre_send_autoreply_email_1', 'my_customize_autoreply', 10, 3);
- On line 17, change the number
1
to the unique ID of the form, from Step 1.