Using form field variables in custom email templates allows you to send personalized emails based on the responses submitted in your form.
This can be helpful to automatically include the submitter’s name, their answers to questions, and other relevant data.
For example, you can include the submitter’s name in the subject line to make the email more engaging.
This guide will help you personalize your emails by utilizing form field data.
Setting up custom emails in your forms
To set up custom email templates, you can pipe the submitted data into the email content, subject, and sender fields.
📝 Additional insights:
Learn how to set up custom emails on your forms and surveys easily by following our guide on How to send custom email templates. This will help you streamline your email setup process and enhance user engagement through personalized communication.
Here's how you can include form responses in various sections of your custom emails:
These variables can be basic text (e.g., form title), URLs (e.g., form logo or address), or dynamically generated data (e.g., results table).
Available variables for custom emails
Form variables
These variables pertain to the form itself and include elements like the form title, description, and success message. They can be used to reference the form's metadata.
form_title: Title of the form.
form_description: Form’s description. Note that this field may have its own styling since it’s created using WYSIWYG.
form_success_message: Form’s success message, since you may want to include it in the email as well.
form_currency: Forms currency code (ISO). For example, USD or EUR.
form_full_address: A URL to the form’s display page (as seen by the end-user). If you’re using subdomains or custom domains, it will be linked to your custom URL. But if you’ve embedded the form in a custom page, it won’t be linked to that page.
form_logo: A URL to the form’s logo if you want to show it in the email.
💡 Pro Tip:
These form variables are particularly useful when creating templates that apply to multiple forms. You can reference them to make your emails more adaptable.
Submitted data variables
These are the most important variables that contain the fields, the submitted data on them, the result of the calculations, and a link to the row’s edit page (accessible by the form admin).
Fields
field_i_title: Title of a field based on its position on the form. For example,
field_2_title
will be replaced by the title of the 2nd field in the form, and the 4th field’s title will replacefield_4_title
.field_i_value: Value of a field based on its position on the form. For example,
field_2_value
will be replaced by the title of the 2nd field in the form, and the 4th field’s title will replacefield_4_value
. This value can be a simple text for most of the fields, such as a choice field, text field, etc, or a link tag for file fields.field_i_url: If a field is a file field, you can use this variable. For example, if your file field is in the 3rd position of your form, you should use
field_3_url
. Whilefield_3_value
is an HTML tag containing the file’s URL. For any field except File fields, this value will be empty.alias_title, alias_value, and alias_url: You can use these to access the fields’ data based on their alias. For example, if a short text field’s alias is first_name, I can access its title and submitted value using
first_name_title
andfirst_name_value
.
💡 Pro Tip:
These variables make it easy to pull in the data entered by respondents, making each email fully personalized. You can also access data based on field aliases, which is particularly helpful for custom field names.
Calculation variables
These variables are useful for forms with calculations, such as score-based assessments or pricing estimations.
score_value: The calculated score for the forms with Logic & calculations.
currency: The calculated currency for the forms with Logic & calculations.
Order data
For forms that involve payments, you can use the following variables to include order details.
order_status: The order status for the forms with payment.
order_code: The order code for the forms with payment.
payment_amount: The payment amount for the forms with payment.
Basic data
These variables track important form submission metadata.
created_at: When was the submission created.
submitter_referer_address: From which address has the user submitted the form?
email_verification_state: Email field verification status if the form has an email verification field.
tracking_code: Row’s tracking code if the form is to give a tracking code to the user.
sumbit_time: How long (minutes) did it take for the user to submit the form.
response_admin_address: A URL to the response’s admin page (only accessible by the user with sufficient access).
Advanced
user_email: Submitter’s email address if the form is receiving the user’s email on an email field.
results_table: Will be replaced by a pre-rendered table containing all of the fields and their submitted data.
pdf_link: You can attach PDFs of submissions to the email notifications by adding the variable ID of pdf_link to your email template
How to use variables for the email Subject, sender name, and sender email
While you can use form variables in various parts of your custom email template, there are some limitations for the email subject, sender name, and sender email fields.
Email Subject: Only simple variables (e.g., form title or user name) can be used in the subject line. Complex variables like
results_table
aren’t supported.Sender Name: This field can accept variables that return text (e.g., user’s name) but should be mindful of length limitations.
Sender Email: For email delivery to succeed, ensure that the sender's email is either a predefined email address or a variable
user_email
that returns a valid email address.
💡 Pro Tip:
For email delivery to function correctly, always check that the email variables are properly set and that no complex variables are used in fields like the subject, sender name, or sender email.