Creating documents with the results

Learn how to convert the information you collected in your Smart Form into any combination of document including PDFs, XML, or JSON.

When a respondent submits your form, how are the results saved? That’s up to you. You can use the results in different outputs. For example, you could create a nicely formatted PDF that summarizes the results. You could also save the results in a JSON file to import into a database or another system.

Tip  Outputs define the documents that are created when the form is submitted. In the Submission panel, you’ll define the destinations that determine where these documents are sent.

Add outputs

Add all of the outputs you want to use with the form.

1. Click DOCUMENTS.

output

2. Click + ADD AN OUTPUT.

output-add

3. Use the following outputs to create a PDF document.

4. Use the following outputs to create a file to import into a database or another system.

5. After adding an output, click APPLY to save it.

Tip  Save often so you don’t accidentally lose any of your work.

output-save

Generate a PDF from an HTML Template

This option creates a PDF document with the form results. The PDF is based on an HTML template you create. In the template, you decide which results to include and how to display them.

output-generate-pdf-from-html-template

Customize the HTML template

Use HTML and CSS to create the layout and style for the PDF. Use the data bindings to insert the respondent’s answers in the PDF.

1. Click anywhere on the DYNAMIC-PDF row. The HTML template is shown on the left. The form data bindings are shown on the right. (Click  to print the data bindings list.)

output-generate-pdf-from-html-template-customize

2. Design the HTML template any way you want. Use the data bindings to insert the respondent’s answers. Data binding names must be enclosed in double curly brances. The following example uses a data binding to insert the respondent’s first name:

<p>{ { respondent.firstName } }</p>

Change the filename

The PDF filename is created automatically. The filename uses the prefix generated-, followed by the unique session ID for the form. To change the filename, click generated-{ { . FORMHERO.SESSION_ID } }.pdf, make your changes and click SAVE.

Tip  You can use data bindings in the filename. For example, you could use the filename Account Change Form for { { client.firstName } } { { client.lastName } }.pdf.

Merge data into a PDF Template

This option creates a PDF document with the form results. The PDF is based on a PDF template you’ve uploaded to FormHero Builder. This lets you format the results to match an existing document your organization already uses.

output-merge-data-into-pdf-template

Map the results to a PDF template

1. Click PDF template and select a template.

Tip  Use the PDF Output Templates area on the Dashboard to upload a template.

pdf-templates-menu

2. Click Version and select the template version you want to use.

3. Map the data bindings to the fields in the PDF template.

Change the filename

The PDF filename is created automatically. The filename uses the prefix generated-, followed by the unique session ID for the form. To change the filename, click generated-{ { FORMHERO.SESSION_ID } }.pdf, make your changes and click SAVE.

Tip  You can use data bindings in the filename. For example, you could use the filename Account Change Form for { { client.firstName } } { { client.lastName } }.pdf.

Generate a JSON File

Use this option to save the form data in a JSON file.

output-generate-json

Map the results using JSON

1. Click anywhere on the JSON row. The JSON template is shown on the left. The form data bindings are shown on the right. (Click the print icon to print the data bindings list.)

output-generate-json-customize

2. Map the data bindings using JSON name/value pairs where the data binding is the value. For example, the data binding client.firstName could be mapped as:

“client_first_name”: “{ { client.firstName } }”

Make sure to use standard JSON syntax when creating the template.

Change the filename

The PDF filename is created automatically. The filename uses the prefix generated-, followed by the unique session ID for the form. To change the filename, click generated-{ {
FORMHERO.SESSION_ID } }.pdf
, make your changes and click SAVE.

Tip  You can use data bindings in the filename. For example, you could use the filename Account Change Form for { { client.firstName } } { { client.lastName } }.pdf.

Generate an XML File

Use this option to save the form data in an XML file.

output-generate-xml

Map the results using XML

1. Click anywhere on the XML row. The XML template is shown on the left. The form data bindings are shown on the right. (Click the print icon to print the data bindings list.)

output-generate-xml-customize

2. Map the data bindings using XML attributes. For example, the data binding client.firstNamecould be mapped as:

<client firstName=”{ { client.firstName } }”></client>

Make sure to use standard XML syntax when creating the template.

Change the filename

The PDF filename is created automatically. The filename uses the prefix generated-, followed by the unique session ID for the form. To change the filename, click generated-{ {
FORMHERO.SESSION_ID } }.pdf
, make your changes and click SAVE.

Tip  You can use data bindings in the filename. For example, you could use the filename Account Change Form for { { client.firstName } } { { client.lastName } }.pdf.

Delete an output

Click ( 🗑) beside the output.