How to Add Field Variables to Confirmation & Notification E-Mails

Written by Formstack on June 8, 2009

Posted in Form Hacks

The default notification e-mail is great, as it includes the submitted data for all form fields, but sometimes you might not want to e-mail all of that info to everyone.  Say you send out two notification e-mails for your order form.  One goes to sales so that they can log contact details of the submitter and contact them in the future.  The other e-mail goes to receiving and needs to contain more details about the order than what sales needs.  You can create two different custom e-mails, one containing just the submitted contact details that goes to sales and the second that contains the contact and order info that goes to receiving.

Another common situation that requires a custom e-mail is when you are collecting sensitive information on your form, such as credit card numbers.  Unless you are using PGP, you shouldn’t be e-mailing credit card numbers to yourself, since e-mail is not a secure method of transmitting sensitive data.  Instead, you can either send a link to your data in your notification e-mail, or you can build a custom notification e-mail that includes all fields except for the credit card field.

So how do you include form field data in a notification or confirmation e-mail?  It’s really quite simple.  Inside of a notification e-mail, click the radio button for “custom message” or simply create a confirmation e-mail, as confirmation e-mails are custom by default.  Next, you will want to scroll down to where it says “Insert Fields” and you will find a list of all the fields on your form.  Click on one of those links to insert the data from that field into your e-mail.

fieldvariables1

Say we have an order form and are collecting name, address, quantity, item, and cost.  We could draft a confirmation e-mail to the user that says something like:

Dear <Name>,

Thank you for ordering <Quantity> of our <Item> for a total cost of <Total>.

fieldvariables2

To do this, click on the name of the field you want to insert when creating your e-mail, and the field ID number for that field will be inserted into your e-mail.  This will look something like this:

Dear {$6423110},

Thank you for ordering {$6423115} of our {$6423114} for a total cost of {$6423116}.

Those field ID numbers will be replaced when the e-mail is sent out by Formstack with the actual info the user submits to your form, so the final result will look like this:

Dear John,

Thank you for ordering 5 of our t-shirts for a total cost of $100.

This is just one short example, as the possibilities for creating custom notification and confirmation e-mails are endless.