Handlebars Snippets

Formik Cloud uses Handlebars wherever you can create custom messages. It is a simple templating language that's expressive enough for most use cases. Handlebars templates look like regular text with embedded Handlebars expressions. In Formik Cloud, we provide your form submission data to message templates as an input object called {{values}}. This allows you to generate dynamic text values and/or add logic based on your form submission data within your messages.

Let's walk through an example to see how this works. Imagine we have a basic contact form with firstName, lastName, email, workEmail, and company fields.

When the end-user submits this form, Formik Cloud will provide the submission data to template-ready actions (such as the Email Action) with a nested input object called (values).

Within the Email Action, you'd be able to reference each field using Handlebars using dot-notation to get to the nested properties:

Submission Variables#

Submission variables are important because they allow you to personalize messages by using the details of the form submission. Type {{ to open the dropdown menu to see your options – your form fields and other relevant details will show up. We highly reccomend using {{values.name}} or your equivalent to personalize your salutation.

Templating Pro Tips#

Both the Rich Text and Raw HTML editors can be used very effectively to create good email templates. Raw HTML will let you do anything you can do in HTML – insert images, do some cool inline css (as long as it's email supported), or use tables.