Word Doc Autofill
Automatically fill and route Word doc templates from your form submission data
If you use a Word doc template, you can include variables in your document via double-curly brace syntax ({{Field1}}
). Feathery will automatically replace variables with the corresponding field value when you fill them out.
Fields can only contain letters, numbers, and underscores when being used in Word Doc Autofill. Other characters may cause the generation to fail by reading the field name as a formula instead.
Creating the Word Doc Template
Feathery supports Jinja templating logic for advanced use cases such as conditionally showing/hiding sections, generating sections in a loop, formulas, and more.
Conditional Logic
You can support conditionally showing or hiding any content / pages using the {%p
syntax show below:
In this example, we have a checkbox field called display_paragraph
in our form that is either true or false.
The first and last paragraphs (those containing {%p ... %}
tags) will never appear in generated Word doc, regardless of the display_paragraph
value.
Here only:
will appear in the generated docx if display_paragraph
is True, otherwise, no paragraph at all are displayed.
You can insert anything within the tag, such as paragraphs, whole pages, etc.
Embed Images
To embed an image into the document that was pulled from a form submission, use the following Jinja syntax:
FileUploadFieldId
is the ID of the file upload field that the image to embed was uploaded to. Width
is the width of the embedded image, in millimeters. Height
is the height of the embedded image, in millimeters.
Set Template Field Values
After your Word template has been uploaded, you can use logic rules and hidden fields to set the template fields to custom values. This allows you to achieve complex logic that was set up during the templating step.
Document Workflow
Once you've mapped your document, you can integrate it into your existing workflow for filling and routing to the desired location. For example, you can include your document as an attachment in a custom email integration to be sent to recipients.
Last updated