(Please note that older articles might not render correctly in mobile view.)
The Handlebars document allows you to build fully custom documents of virtually any type. 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, we recommend using those document types instead; Handlebars can be used to customize those documents.
Like all documents in ProntoForms, 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.
- Create the document, and select Handlebars as the document type.
- Name the document, and optionally provide a description.
- Configure a document Filename, to control what the document will be named when sent through destinations. Use Data Record Expression Language (DREL).
- Choose a Document Timezone source.
- Optionally auto-link the document to forms.
The document can be any text-based file type (HTML, .txt. .xml, etc). This is the file type the document will create.
Leave this blank for automatic resolution based on file extension. Read here for a list of content types.
Supply the document body, using Handlebars to reference answers from your form submission. Read the documentation here.
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.