Custom Document Builder with Formstack Forms & Documents
Recently I've been building a lot of custom documents with Formstack Forms and Documents... so I thought I'd take you inside my thought process, setup and how I am building these documents.
A few things to note:
- I am building documents that use logic to determine which pages to include / exclude. This requires logic on both the Form and Document.
- I am using PowerPoint as my source file because it allows for the most visual presentation flexibility. You can achieve similar results with Word or PDF as your source documents
The key to setting up your form is thinking through what logic will drive the document output. The goal is to capture information in your form that will allow you to determine how to build your document. The most straight forward example of this is a simple radio button asking users if they want to include certain sections in the document. E.g. Would you like a legal disclaimer included in the document? If yes, then include the pages. If no, then exclude the pages.
Sometimes you can't really ask the questions so directly - so you'll need to use something more than just Yes/No logic to determine what to show or hide. For example, if you want to show disclaimers based on the state a person lives. (E.g. If person lives in Minnesota, show MN disclaimer page. If a person lives in Florida, show FL disclaimer. Otherwise do not show a disclaimer page). In this example, you could have a state dropdown or a text field for state. This information could then be used to determine which pages to include in the document.
To take that a step further, you can setup your form to have logic based on the state a person lives in. So if a person lives in Florida, you might ask another follow up question. In your document on the Florida page, you could then include information from or based on that follow up question.
Document Logic Code
Formstack Documents has some really good support documentation to help you create dynamic documents. Here are a few good ones:
Pro Tip 1: When google for help documents, search for "Webmerge" instead of Formstack. Webmerge was purchased by Formstack, and I find it's easier to find the support articles when searching for Webmerge.
Pro Tip 2: When you've found a good Webmerge Support Article, be sure to read the comments. Jeremy Clarke, the founder of Webmerge, responded to questions with code snippets and really helpful tips right in the comments.
In the end, you can create some really powerful document generation systems. These systems may include complex logic in both the form and document — resulting in highly customized documents for your end users. The most important thing though... despite having complex logic, your end users will have a very simple experience that generates custom documents in a fraction of the time.