Example Email Template

The Forms app has the option to send templated HTML emails. If using this option, you need to create a template that outputs the fields you are collecting.

Form email templates live in the folder perch/templates/forms/emails and should have .html file extensions.

Creating a template

The template should be a complete HTML page containing Perch template tags wherever you need to output content. A very barebones example would be as follows.

    <title><perch:email id="email_subject"></title>
  <h1>A message from your website</h1>
  <p><perch:email id="email_message" encode="false"></p>
      <td><perch:email id="name"></td>
      <td><perch:email id="email"></td>
      <td><perch:email id="message" encode="false"></td>

Use <perch:email> tags to output your content, with an ID to match the ID in your form template.

Two special values are defined:

Name Value
email_subject The email subject line.
email_message The introduction message defined in the form options.