Skip to content

Templating

Templating in FabForm allows you to create personalized text messages by merging form data from the actual form submission with pre written text.

You use a {my-name} placeholder to mark where and what you want to merge from the form data. imy-name being the name you gave to the form field you want to insert.

An email address could be referenced like this {email}

In this simple example form we are collecting two pieces of data. One has a name of firstName, and the other has a name of lastName.

Also, be sure to replace in the action property the form id xxxxxxx with a real form id that you created.

<form action="https://fabform.io/f/xxxxx" method="post">
<label for="firstName">First Name</label>
<input name="firstName" type="text" required>
<label for="lastName">Last Name</label>
<input name="lastName" type="text" required>
<button type="submit">Send</button>
</form>

In our template, we can now refer to this form data. We could have a message like this in our template text.

Dear {firstName} {lastName}
We are ....

The {firstName} and {lastName} placeholders will be replaced with the submitted form data.

Dear Paul Smith
We are ...