Document Templates
Generate professional PDF documents from form submissions using customizable templates with field placeholders
What This Feature Does
Document Templates allow you to create professional PDF documents from form submissions. Instead of manually copying data into Word or Excel, you define a template once and generate polished documents automatically. Templates can include your branding, formatted layouts, and all the data from form submissions.
Understanding Templates
How Templates Work
- Create a template with placeholders for form fields
- User submits a form with their data
- Generate document that replaces placeholders with actual values
- Download or share the completed PDF
Template Components
- Static Content: Text, images, and formatting that appear on every document
- Field Placeholders: Variables replaced with submission data
- Conditional Sections: Content that appears based on field values
- Repeating Sections: Content that repeats for table data
Creating a Template
Setting Up Your First Template
- Navigate to "Forms" in the left sidebar
- Select the form you want to create a template for
- Click the "Templates" tab
- Click "Create Template"
- The template builder opens
Template Builder Interface
Left Panel - Field Placeholders
- Lists all fields from your form
- Click to insert placeholder at cursor
- Shows placeholder syntax
Center Canvas - Template Editor
- Rich text editing area
- WYSIWYG formatting
- Drag to position elements
Right Panel - Settings
- Document settings (size, margins)
- Header/footer configuration
- Page numbering options
Adding Content to Templates
Static Text
Type directly in the template editor:
- Format text using the toolbar (bold, italic, etc.)
- Create headings and paragraphs
- Add bullet points and numbered lists
Field Placeholders
Insert form data using placeholders:
- Place cursor where you want the data
- Click a field in the left panel, or
- Type the placeholder manually:
{{field_name}}
Example:
Site Inspection Report
Location: {{site_location}}
Date: {{inspection_date}}
Inspector: {{inspector_name}}
Available Placeholder Types
Form Fields:
{{field_name}}- Value of any form field
Submission Metadata:
{{_submission_id}}- Unique submission ID{{_submitted_at}}- Submission date/time{{_submitted_by}}- Name of person who submitted{{_form_name}}- Name of the form
Account Information:
{{_account_name}}- Team/company name{{_account_logo}}- Company logo image
Formatting Placeholders
Date Formatting
Format dates with modifiers:
{{date_field}}- Default format{{date_field | date:"MM/DD/YYYY"}}- Custom format{{date_field | date:"MMMM D, YYYY"}}- Long format (January 15, 2025)
Number Formatting
Format numbers with modifiers:
{{amount}}- Raw number{{amount | currency}}- Currency format ($1,234.56){{amount | number:2}}- Two decimal places
Text Formatting
Transform text:
{{name | uppercase}}- UPPERCASE{{name | lowercase}}- lowercase{{name | capitalize}}- Capitalize First Letter
Adding Images
Static Images
Add fixed images to your template:
- Click "Insert Image" in the toolbar
- Upload an image or provide URL
- Position and resize as needed
Common uses:
- Company logo
- Certification marks
- Standard diagrams
Dynamic Images from Form Fields
Include images uploaded in form submissions:
- Ensure your form has a FileUpload field for images
- In the template, insert:
{{image_field}} - The uploaded image appears in the document
Signature fields:
{{signature_field}}- Includes the captured signature
Image Sizing
Control image dimensions:
{{image_field | width:200}}- Set width in pixels{{image_field | height:150}}- Set height in pixels{{image_field | maxWidth:300}}- Maximum width
Table Data
For forms with Table fields, generate rows dynamically.
Repeating Rows
Create a table that repeats for each row in a Table field:
Materials Used:
| Material | Quantity | Unit |
|----------|----------|------|
{{#materials_table}}
| {{material}} | {{quantity}} | {{unit}} |
{{/materials_table}}
Table Syntax
{{#table_field}}- Start repeating section{{/table_field}}- End repeating section- Inside: use column names as placeholders
Table Calculations
Include calculations for table data:
{{materials_table.count}}- Number of rows{{materials_table.sum:quantity}}- Sum of quantity column{{materials_table.avg:price}}- Average of price column
Conditional Content
Show or hide sections based on field values.
Basic Conditionals
{{#if status == "Failed"}}
⚠️ INSPECTION FAILED - Immediate action required
{{/if}}
If-Else Conditionals
{{#if risk_level == "High"}}
This is a HIGH RISK area. Take extra precautions.
{{#else}}
Standard safety procedures apply.
{{/if}}
Multiple Conditions
{{#if status == "Failed" && severity == "Critical"}}
CRITICAL FAILURE - Escalate immediately
{{/if}}
Checking for Empty Values
{{#if comments}}
Additional Comments: {{comments}}
{{/if}}
Only shows the section if comments field has a value.
Headers and Footers
Adding a Header
- Click "Header" in the template settings
- Add content:
- Company logo
- Document title
- Page numbers
- Header appears on all pages
Adding a Footer
- Click "Footer" in the template settings
- Add content:
- Page numbers:
Page {{_page}} of {{_pages}} - Date generated
- Confidentiality notice
- Page numbers:
- Footer appears on all pages
Different First Page Header
- Enable "Different First Page"
- Configure first page header separately
- First page can have a detailed header
- Subsequent pages have a simplified header
Page Settings
Document Size
Choose page size:
- Letter (8.5" x 11")
- A4 (210mm x 297mm)
- Legal (8.5" x 14")
- Custom dimensions
Margins
Set page margins:
- Top, Bottom, Left, Right margins
- Consistent margins for professional appearance
Orientation
Choose orientation:
- Portrait (vertical)
- Landscape (horizontal)
Template Examples
Safety Inspection Report
[Company Logo]
SAFETY INSPECTION REPORT
Date: {{inspection_date | date:"MMMM D, YYYY"}}
Location: {{site_location}}
Inspector: {{inspector_name}}
---
INSPECTION SUMMARY
Overall Result: {{overall_status}}
Risk Level: {{risk_level}}
{{#if overall_status == "Failed"}}
⚠️ ACTION REQUIRED: This inspection has failed.
Please address all issues before work continues.
{{/if}}
---
INSPECTION ITEMS
{{#inspection_items}}
☐ {{item_description}}
Status: {{item_status}}
{{#if item_notes}}Notes: {{item_notes}}{{/if}}
{{/inspection_items}}
---
PHOTOS
{{#if site_photos}}
{{site_photos}}
{{/if}}
---
SIGNATURES
Inspector: {{inspector_signature}}
Date: {{_submitted_at | date:"MM/DD/YYYY"}}
Supervisor: {{supervisor_signature}}
Date: {{supervisor_date | date:"MM/DD/YYYY"}}
Daily Site Diary
DAILY SITE DIARY
Project: {{project}}
Date: {{diary_date | date:"dddd, MMMM D, YYYY"}}
Weather: {{weather_conditions}}
---
PERSONNEL ON SITE
{{#workers_table}}
• {{worker_name}} - {{trade}} ({{hours}} hours)
{{/workers_table}}
Total Workers: {{workers_table.count}}
---
WORK COMPLETED TODAY
{{work_description}}
---
MATERIALS DELIVERED
{{#materials}}
• {{description}} - Qty: {{quantity}}
{{/materials}}
---
ISSUES/DELAYS
{{#if issues}}
{{issues}}
{{else}}
No issues reported.
{{/if}}
---
Submitted by: {{_submitted_by}}
Date/Time: {{_submitted_at}}
Generating Documents
From a Single Submission
- Navigate to Submissions
- Open the submission you want to generate a document for
- Click "Generate Document"
- Select the template to use
- Click "Generate"
- PDF downloads or opens in new tab
Bulk Generation
Generate documents for multiple submissions:
- In the submissions list, select multiple rows
- Click "Bulk Actions"
- Select "Generate Documents"
- Choose template
- Click "Generate"
- Download ZIP file with all PDFs
Automated Generation via Workflow
Generate documents automatically on submission:
- Set up a Workflow
- Add "Generate Document" action
- Select template
- Configure delivery:
- Attach to submission
- Email as attachment
- Save to storage
Managing Templates
Editing Templates
- Navigate to form's "Templates" tab
- Click on template to edit
- Make changes
- Save template
Duplicating Templates
- Click actions menu on template
- Select "Duplicate"
- Modify the copy as needed
- Save with a new name
Deleting Templates
- Click actions menu on template
- Select "Delete"
- Confirm deletion
Note: Deleting a template doesn't affect already-generated documents.
Template Versions
Templates maintain version history:
- Open template
- Click "Version History"
- View previous versions
- Restore if needed
Troubleshooting
If placeholders aren't replacing
- Verify placeholder syntax:
{{field_name}} - Check field name matches exactly (case-sensitive)
- Ensure the field has a value in the submission
If images aren't appearing
- Check image field has an uploaded file
- Verify file is an image format
- Check image sizing isn't too small
If tables aren't generating rows
- Verify table field has data
- Check opening and closing tags match
- Ensure column names are correct
If conditional content isn't working
- Verify field values match condition exactly
- Check operator syntax (==, !=, &&, ||)
- Test with simpler conditions first
If PDF layout is broken
- Check page margins
- Reduce image sizes
- Simplify complex formatting
- Test with less content
Best Practices
- Design for data: Plan templates around your form fields
- Test thoroughly: Generate test documents with various data
- Use consistent branding: Include logo and company colors
- Keep it readable: Don't overcrowd with too much data
- Consider printing: Test how documents look when printed
- Version control: Keep track of template changes
- Document your templates: Note what each template is for
What's Next
After creating templates, you may want to:
- Set up Workflows for automated document generation
- Review Submissions to generate documents
- Configure Permissions for template access
- Learn about AI Form Generator for quick form creation

