Documentation

Overriding configuration settings >> << Configuring the fields

Creating the mail template

All forms need a mail template that controls the formatting of sent emails. The default mail template is loaded from php/SimpleContactForm/forms/.DefaultMailTemplate.html. This template is used by all forms by default if a form specific template is not found.
The mail template is simply an HTML file that tells the script how to format the email and where to insert the field values.
Field values are inserted with the pseudo HTML tpl tag : <tpl:FIELD-NAME> where FIELD-NAME is the name of an existing field.

Below the code from the default mail template is shown as an example

1
2
3
4
5
6
7
8
9
10
11
<h3><tpl:Website> Enquiry Form</h3>
<br />
<strong>Sent by</strong>        : <tpl:Name><br />
<strong>Email</strong>          : <tpl:Email><br />
<strong>Contact number</strong> : <tpl:Number><br />
<strong>Message</strong> :<br />
<pre>
----------------------------------------
<tpl:Message>
----------------------------------------
</pre>

Overriding configuration settings >> << Configuring the fields