Personalize Your Form Response PDFs: Template Editor
Whautomate generates PDF automatically when someone submits a form. You can use this functionality to customise the PDF generated for your needs and send it to the client who filled up the form.
Step 1: Go to the Whautomate app, Select the Settings menu option, and Click the Forms option in the Templates section to continue.
Step 2: Select the form you want to edit the PDF template, then select the Edit PDF Template section and Click the Customise PDF Template button to continue.
Step 3: On the left side section of the Template, you can edit various elements such as Font, Font Size, color, Form Responses, add custom content, and more! 👇
Step 4: Within the right-side section of the PDF Preview, after modifying the template, click the "Save and Preview" button to observe the changes in the Preview section. 👇
Step 5: Select the Data section to access the data used for the generated PDF preview. You can also change the form response to review different previews while editing your template.
How to Customise PDF Template?
Let us understand the PDF Template and its different sections The PDF template comprises various sections within a basic HTML document styled with CSS. It serves to generate the PDF upon form completion. Utilizing Handlebars, a straightforward templating language, enables a dynamic content population based on each response.
Please check here to understand or learn about
handlebars - https://handlebarsjs.com/guide/#what-is-handlebars
Lets understand the different sections of the PDF template
CSS Styles
It is a simple styling which is catered for the PDF document in A4, You can customise it according to your need.
Header Section
The Header section has the business information and the logo as per the business settings setup within Whautomate. You can customise this to have a custom header for the generated PDF.
PDF Content - Form Responses Section
This section forms the PDF content which loops through each section within the form response and displays the question and the answer in a table format. You can use handlebars syntax to apply the data and conditions to generate a PDF document according to your need.
To Add Custom Content based on Form Answers, Please follow the below example
Step 1: Navigate down to the Template Editor section to access the form response answer condition area. We've included a sample test answer condition by default. Simply customize the condition to align with your real-time answer response report. 👇
Note: To edit the Form Response PDF Template, ensure you have at least one form response to view real-time data, or you can only access the variable data.
(i) To generate a form answer responses report for multiple questions, copy the example condition provided below. 👇
Copy and paste it into the Template Editor section. Scroll down to find the default condition for one answer; if you wish to add more, paste them consecutively. Utilise our custom helpers available to generate content conditionally.
HandleBars Custom helpers by Whautomate
IfAny: Use this helper to check if the answer or question is of any of the possible values. E.g. {{#ifAny this.answerValue "red,green,blue"}} IfEquals: Use this helper to check if the answer or question is equal to specific value. E.g. {{#ifEquals this.answerValue 'test'}}
Conditionally generated Content example
Step 2: After modifying the form template, Click the Save and Preview button to see the template changes in the Preview section.👇
Last updated