All Collections
FAQ's and Troubleshooting
How to use the Contact Form "Message Pattern"
How to use the Contact Form "Message Pattern"

How to customize the message body layout with the message pattern option in the contact form module

Cristi avatar
Written by Cristi
Updated over a week ago

What is a message pattern? 

It's a way for you to customize the layout of the message you receive from people. By default, it would include all of the form fields (except the name and email), but if for some reason you want to change the layout, you can use this option.

Why use the message pattern? 

  1. To include the name and email in the message body, because by default it's not included, however, when you click the reply link you'll see the sender name and email there: 

2. To style the message and make it more clear, especially when you have a lot of fields, you'll want to organize the message better. 

3. To add a title to the contact form, so you'll know from which page this message came from (if you have multiple contact forms on the site).

And for other reasons maybe.


How to use it?

Very simple, put your text (ex: from John) and replace the name here with a variable of the name field. 

Here's a practical example, but first let's take a look at the form:  

This is how our message gets to our inbox: 

Let's say we want to change that to something like: 

From (John Doe), phone number is: (123456789) via ([email protected])
TOS choice: (Yes)
Message: (Hello, this is the message.)


This is how we add the message pattern: 

So we basically add the field ID wrapped within %% at the beginning and the end of it. And we get this output: 

By using this option, you can customize the message layout in any way you want.

Important. The Field ID and Message Pattern field should follow the following rules:

  1. The message pattern field doesn't accept HTML code;

  2. A Field ID name must start with a letter or the underscore character;

  3. A Field ID name cannot start with a number;

  4. A Field ID name can only contain alpha-numeric characters and underscores (A-z, 0-9, and _ );

  5. Field names are case-sensitive ($age and $AGE are two different variables).

Did this answer your question?