Configure submission appearance in your messengers

You may set up template to format your incoming submissions. The formatted data will be then used with enabled integrations. We are using Liquid template engine to power up your custom templates.

Please note: custom templates do not support special characters or spaces in form field names. This includes hyphens, dashes, and quotation marks. If your form field names contain any of these characters, please rename these fields (e.g. by using underscore instead), otherwise custom templates won't work correctly.

Simple example

Let's suppose you have a simple contact form with name and email inputs

<form>
  ...
  <input type="text" name="name">
  <input type="email" name="email">
  ...
</form>
You may use double curly braces to access your submission content in the submission template:

Name: {{name}}
Email: {{email}}
If you have enabled telegram or any other integration, then when a visitor on your website submits contact form with name "John" and email "mail@example.com", you will receive the following message from our Teleram Bot:

Name: John
Email: mail@example.com
But what if you have many fields in your form or you simply want to be able to add a new field to your form any time and don't want to worry about updating configuration in form2chat dashboard? In this case you may simply use liquid engine loops:

{% for field in payload %}
{{ field.first | capitalize }}: {{ field.last }}
{% endfor %}
The code above will iterate over all the submitted fields and output name and content of each field on a new line. With such a submission template you may add 1 or more fields to your form and, when a new submission is created, all of the submitted fields will be sent to you automatically without a need to make changes in the form2chat dashboard.

For more complex examples and details on how liquid template engine works, please refer to the Liquid template engine documentation.