By creating and uploading your own template to a specific desination, you will be able to make the layout of your Word or PDF report match your original form more closely or create a completely new format. 

To customize the Word or PDF file during your Destination set-up, you'll need to create a Word or PDF Destination.

Note:
If you already have a custom template uploaded to your destination and would like to update it, see this article.

Set up your PDF / Word Destination

1) Select the Destination location (in the example below, that is email). 

2) Next, click on either the PDF or DOCX file format.

Download your Form's Sample Template

3) Once you select the PDF or DOCX format, navigate down to Step 5 and click the link for "Show Options".

4) After you click "Show Options", you will see the screen below. Click on the green "Download a sample template" button to download the Word file template which you can use to customize your output.

This sample template provides you with all the placeholders. These placeholders dictate where the form fields map in the document once the form has been submitted.

Note: For another method to quickly obtain valid placeholders in for your form, please have a look at this article.

5) Once the file has downloaded and opened, the first page will look something like this:

The screenshot below was taken from a sample form titled "Work Order". As you scroll through it, you will see the different placeholders available.

Note: Everything in double curly brackets, including the double curly brackets is a placeholder)

Create your Custom Word Template

6) Now, open a new Word document. In the new Word document, you can set up the form with the headers and footers you'd like to use, as well as any branding you want to include.

7) Next, you can go on to add the question titles to the document in any order you like.

Add your Placeholders

8) Copy the placeholders from the sample and paste them wherever you would like the answers to appear.

Note: Questions and answers can also be put in tables. Design the table as usual, and put the placeholders where you want the answers to go.

See the example image below, on the left is the downloaded sample template and on the right is the custom template that will be uploaded to the destination.

Note: In the event that a question is not answered, the placeholder will be replaced with a blank space. If you would like to conditionally show questions/data in your report, check out this article on if statements.

Upload your Custom Template

9) Once you're done with designing your Word template, save it to your computer.

10) Navigate back to your Destination Settings and click the "Upload my Word .DOCX template" button and select the file.

11) Lastly, click "Update Destination" and you're all set!

Additional Custom Formatting:

Font, Size and Color:

If you would like the questions and answers to appear in a particular font, size or color, all you need to do is highlight the questions and placeholders and change the font, size and color. When the form comes through, the answers that have replaced the placeholder will be in the same font, size and color as the placeholder.

Images:

Images added to the form can be resized using size specifications in the placeholder. For example, if your image question placeholder is {{fields.image_question}} , and you want the image to appear in 400x200 you can ensure the image arrives at the destination in the size you desire by adding |400x200  to the end of the placeholder. It will look something like this: {{fields.image_question|400x200}} .

Decimal/Integer Questions:

Decimal and integer question placeholders can be edited by adding |currency  at the end of the placeholder, before the closing brackets. This will make the decimal and integer answers come through with two spaces after the decimal. For example, if the answer is 23.23246, the adjusted placeholder will make the answer come through as 23.23.

Multi-Select Questions:

When a select question has the "Allow Multiple Answers" box checked, and multiple options are selected in the form, the answers come through all on the same line, separated by commas. This can now be adjusted so the answers come through on separate lines, by adding |each_answer_on_new_line  at the end of the placeholder, before the closing brackets.

Location Questions:

Maps can now be resized using size specifications in the placeholder, much the same as the Image question. So, for example, if your location question placeholder is
{{fields.location_question}}
, and you want the map to appear in 100x100, you can ensure it arrives in that size by adding the size restriction at the end of the placeholder so the placeholder looks like this: {{fields.location_question|100x100}} .

For more location formatting options, click here.

Time/Date Questions:

For Time and Date formatting options, click here.

Subforms:

When it comes to subforms, you will see the main subform heading among the available placeholders, as well as each of the subform's question's placeholders. You can choose to either have the subform altogether, and use the subform heading placeholder, or you can choose to separate the questions (perhaps include some, but not others, or place them separately in the template), and use the individual placeholders.

Repeat Groups:

Repeat group answers are automatically generated in table format, but there are options to display these answers in other layouts.

-Preferred Repeat Group Method

For the preferred method of customizing data within a repeat group, please see this help article: Advanced PDF/Word Template Design: For Loops

-Legacy Method

The options below are legacy options which are still supported and can be used if you prefer.

To display your Repeat Group answers in a list instead of a table, use the formatting option |list

Another way you can format your repeat groups is by filtering the questions that you choose to display (this works with the default display as well as the list layout).

The basic way to structure the repeat group placeholder is as follows:

filter_fields: [question_1, question_2] 

Sub-groups in repeat groups can be filtered as well by adding the sub section when specifying the fields you want included:

For example, [field1, field2: [subfield1, subfield2], field3] 

The placeholder should look something like this:

{{fields.Group|list, filter_fields: [Question1, Question2: [SubQuestion2_1, SubQuestion2_2], Question3]}} 

Lastly, if you filter image and location questions, you can resize the images and maps (the same as mentioned above). For example, your image question's placeholder will look something like this: {{fields.Group|list, image_size:300x100}} , whereas your location question's placeholder will look something like this: {{fields.Group|list, map_size:300x100}}  .

Conditionally Show Data:

If statements are used to conditionally show data. For example, this can be useful if you'd like a question label to be omitted from the document, if the associated question isn't answered. They can also be used to create checkboxes. This article explains how to set up if statements.

If you have any questions or comments feel free to send us a message at support@devicemagic.com.

Did this answer your question?