| FormToEmail Remote | |
| Remotely hosted form service | Home Register Pro Signup Login Contact Support |
|
Email templates
Applies to the Pro service only By default the system formats the output email in a certain way, be it the standard output email or the autoresponse email. This format is simple, clean and basic. For plain text emails, the output shows the form field names together with the submitted data. For HTML formatted emails, the same information is shown in a table, with the field names in bold. There is a limited amount of customization you can do with these. If you have a need for formatting the output email in a particular way, then you can use a template to make the body of the email, which means it can appear exactly as you want it to, be it plain text or HTML. You can write the template in straight plain text or you can write it in HTML, just like you were writing a web page. You can use a template for the standard email output and also for the autoresponse email that gets sent to your visitor (if enabled). To use a template, you need to write it first then enable the option for it in the form configuration in the User Admin Area, which you can get from the "Login" link above. The option to enable is email_template You should enter your template code in the email_template_content textarea of the configuration. Making a plain text template
Open a new blank file in a text editor (such as Notepad). Write the text in the file just as you would like the email to appear. To show submitted values from the form, use this placeholder:
ff<form_field>
Replace form_field with the name of the form field you want to get the data from. Here's an example. Suppose you have these inputs on your form:
<input type="text" name="name">
<input type="text" name="email"> <input type="text" name="state"> You could put this text in your email template file:
Message from ff<name>.
The visitor's email address is: ff<email> The visitor is from ff<state>. Suppose the visitor enters his name as Bob, and his email address is bob@example.com and he is from Texas. This will produce the following text in the email you get:
Message from Bob.
The visitor's email address is: bob@example.com The visitor is from Texas. With a plain text template, write the template exactly as you want it to appear in the email, like above. Line breaks are automatically converted, so you can make new lines or paragraphs and these will be replicated in the email you get. So effectively you are just writing the email as you want to get it but using the ff<form_field> placeholders where appropriate. When you have written the template file, paste the contents of the file into the email_template_content textarea in the file configuration edit page. Important. Write the form field in the placeholder EXACTLY as it appears in your form. So if you have an input on your form like this:
<input type="text" name="First_NAME">
You would use ff<First_NAME> in your template.
Making an HTML template
<html>
<head> <title>Message from ff<name></title> </head> <body> <p>A message from <b>ff<name></b> whose email address is ff<email> and who is from ff<state>.</p> </body> </html> For HTML emails you should use very simple and often deprecated HTML. This is due to notoriously poor support for HTML in email readers. Equally, support for CSS isn't great. Experiment with your own email program. If using an HTML template, you need to enable the $html_format option in the form configuration. Showing system-generated values
ff<Sender's IP address>
ff<Date submitted> ff<message_id> ff<file_input> (file_input is the name of the file input on your form. Use this for showing attachment filenames.) Email subject
Using a template for the autoresponse email
|
| © FormToEmailRemote.com 2009 - 2012 |