Handlebars Documents

Contents

About

The Handlebars document allows you to build custom documents. For example, you could build a custom CSV format, or even a KML file. You can also add loops or conditions to control how the document behaves in different scenarios, based on the data in a form submission.

If you are looking to build a custom PDF, Word, or HTML document, use those document types instead; Handlebars can be used to customize the layouts of those documents.

Like all documents in TrueContext, Handlebars documents can be sent to cloud and enterprise services, web services, and more. A number of document types are available, and multiple documents can be sent with a single form submission. Read more about documents here.

Basic Setup

  1. Create the document, and select Handlebars as the document type.

  2. Name the document, and optionally provide a description.

  3. Use a DRELClosed Data Reference Expression Language (DREL) is used to get form data and metadata and add it to a string, such as dates, usernames, or answers to questions in forms. expression to configure a document Filename. This name applies to all instances of the document, including downloaded documents and documents sent by Data Destinations.

    Tip:A recognizable file name can help you quickly search for and identify files when:
    • You download files from multiple form submissions so that you can work locally.

    • You or your customers receive multiple messages generated by Email Destinations.

  4. Choose a Document Timezone source.

  5. Optionally auto-link the document to forms.

Template Setup

File Extension

The document can be any text-based file type (HTML, .txt. .xml, etc). This is the file type the document will create.

Content Type

Leave this blank for automatic resolution based on file extension.

Template

Supply the document body, using Handlebars to reference answers from your form submission. .

Remember to format your template according to the content type; if you want to generate an XML document, be sure to format it correctly in XML.

Info:We recommend that you escape the data to ensure that the system generates the documents in a valid format.