Text Templates (Text, CSV, JSON, XML)

Text Templates (Text, CSV, JSON, XML)

You’re probably already familiar with our platform’s ability to produce custom PDF reports from Word or Excel templates using our Data Template Syntax. However, you can also produce file outputs like Plain TextCSVJSON, and XML.

Form Connectors that can generate and upload custom file outputs can do so in the following formats:

  • Body – An Email connector option that allows the body of an email to be generated using HTML.
  • CSV – Generate a CSV file using a Text (.txt) template.
  • JSON – Generate a JSON file using a Text (.txt) or JSON (.json) template.
  • Excel – Generate an Excel file using an Excel (.xlsx) template.
  • Word – Generate a Word file using a Word (.docx) template.
  • PDF – Generate a PDF file using a Word (.docx) or Excel (.xlsx) template.
  • Plain Text – Generate a Text file using a Text (.txt) template.
  • XML – Generate an XML file using a Text (.txt) or XML (.xml) template.

This article focuses on custom Text (.txt) templates and using HTML in the body of an email. Providing examples of static text, form-captured data, and repeatable outputs.


Body

This option is specific to the Email Connector and allows you to tailor the body of an email with custom HTML.

On an Email Connector, click the Customize Email option to show the Body property. You can add your own static text and reference field data names to output form-captured data in a custom HTML body.

Example

<table border="1">
<tr>
<td>First Name</td>
<td>{{first_name}}</td>
</tr>
<tr>
<td>Last Name</td>
<td>{{last_name}}</td>
</tr>
<tr>
<td>ID Number:</td>
<td>{{id_number}}</td>
</tr>
<tr>
<td>
<h4>Special Achievements</h4>
</td>
</tr>
{{!REPEATSTART}}
<tr>
<td>Special Achievement:</td>
<td>{{special_achievement}}</td>
</tr>
<tr>
<td>Date Achieved:</td>
<td>{{date_achieved}}</td>
</tr>
{{!REPEATEND}}
</table>

Output


CSV

This option generates a .csv output using a .txt file. Depending on your needs, the .txt file can be formatted with static text and form-captured data, including repeatable data, for the column/row structure.

Example

first_name;last_name;special_achievement;date_achieved
{{!REPEATSTART}}{{first_name}};{{last_name}};{{special_achievement}};{{date_achieved}}
{{!REPEATEND}}

Output


JSON

This option generates a .json output using a .txt file. Depending on your requirements, the .txt file can be formatted using JSON syntax to control the structure with name/value pairs and arrays for repeatable data.

Example

{
"First_Name": "{{first_name}}",
"Last_Name": "{{last_name}}",
"Special_Achievements": [
{{!REPEATSTART}}
{
Special_Achievement: "{{special_achievement}}",
Date_Achieved: "{{date_achieved}}"
},
{{!REPEATEND}}
],
"ID_Number": "{{id_number}}"
}

Output

Plain Text

This option generates a .txt output using a .txt file. Depending on your requirements, the .txt file can be formatted with static text and our Data Template Syntax for form-captured data, including repeats.

Example

This is a plain text template.

First Name: {{first_name}}
Last Name: {{last_name}}
ID Number: {{id_number}}

{{!REPEATSTART}}
Special Achievement: {{special_achievement}}
Date Achieved: {{date_achieved}}
---------------------------------------------
{{!REPEATEND}}

Output


XML

This option generates a .xml output using a .txt file. Depending on your requirements, the .txt file can be formatted using XML syntax to control the structure with attributes, including repeatable captured data.

Example

<person>
<First_Name>{{first_name}}</First_Name>
<Last_Name>{{last_name}}</Last_Name>
<Special_Achievements>
{{!REPEATSTART}}
<Special_Achievement>
<Achievement>{{special_achievement}}</Achievement>
<Date_Achieved>{{date_achieved}}</Date_Achieved>
</Special_Achievement>
{{!REPEATEND}}
</Special_Achievements>
<ID_Number>{{id_number}}</ID_Number>
</person>

Output

    • Related Articles

    • Repeatable Data in Templates

      After capturing repeatable data, you might want to customize how it displays in a PDF output using Word or Excel templates. There are two ways to output the answers for these repeatable fields in your template: Repeat rows in a Word table or Excel ...
    • Word Templates

      Our platform allows you to export Data in the layouts you want using Microsoft Word templates or Excel. If you already have Word documents that you have been printing out to use as data capture Forms, you can reuse them as data templates with a few ...
    • Excel Templates

      Our platform allows you to export Data in the layouts you want using Microsoft Excel templates. If you already have Excel documents that you have been printing out to use as data capture Forms, you can reuse them as data templates with a few minor ...
    • Task Templates

      Task Templates let you pre-set various properties of a regular task within your business process as a template that can be used when creating a new task, making the process quicker for dispatchers. Without a template, you need to set every aspect of ...
    • Built-In Templates

      Our platform offers a few built-in templates that can be used when exporting form-captured data in PDF. Even though you can fully customize your outputs using Word or Excel files, the following new and improved built-in templates may come in handy ...