Project

General

Profile

Paste
Download (1.62 KB) Statistics
| Branch: | Revision:

root / drupal7 / sites / all / modules / webform / templates / webform-mail.tpl.php @ 389fb945

1
<?php
2

    
3
/**
4
 * @file
5
 * Customize the e-mails sent by Webform after successful submission.
6
 *
7
 * This file may be renamed "webform-mail-[nid].tpl.php" to target a
8
 * specific webform e-mail on your site. Or you can leave it
9
 * "webform-mail.tpl.php" to affect all webform e-mails on your site.
10
 *
11
 * Available variables:
12
 * - $node: The node object for this webform.
13
 * - $submission: The webform submission.
14
 * - $email: The entire e-mail configuration settings.
15
 * - $user: The current user submitting the form. Always the Anonymous user
16
 *   (uid 0) for confidential submissions.
17
 * - $ip_address: The IP address of the user submitting the form or '(unknown)'
18
 *   for confidential submissions.
19
 *
20
 * The $email['email'] variable can be used to send different e-mails to
21
 * different users when using the "default" e-mail template.
22
 */
23
?>
24
<?php print ($email['html'] ? '<p>' : '') . t('Submitted on [submission:date:long]') . ($email['html'] ? '</p>' : ''); ?>
25

    
26
<?php if ($user->uid): ?>
27
<?php print ($email['html'] ? '<p>' : '') . t('Submitted by user: [submission:user]') . ($email['html'] ? '</p>' : ''); ?>
28
<?php else: ?>
29
<?php print ($email['html'] ? '<p>' : '') . t('Submitted by anonymous user: [submission:ip-address]') . ($email['html'] ? '</p>' : ''); ?>
30
<?php endif; ?>
31

    
32
<?php print ($email['html'] ? '<p>' : '') . t('Submitted values are:') . ($email['html'] ? '</p>' : ''); ?>
33

    
34
[submission:values]
35

    
36
<?php print ($email['html'] ? '<p>' : '') . t('The results of this submission may be viewed at:') . ($email['html'] ? '</p>' : ''); ?>
37

    
38
<?php print ($email['html'] ? '<p>' : ''); ?>[submission:url]<?php print ($email['html'] ? '</p>' : ''); ?>