We noticed that JavaScript is disabled in your browser. We suggest enabling it for a better experience.
We noticed you're using an older version of Internet Explorer. We suggest you update to the latest version for a better experience.
Skip to main content

Generate custom documents from response data

Enterprise plan

MicrosoftTeams-image (10).png

Use custom documents to streamline your post-submission processes by piping response data into official records and other documents, then automatically send those documents to the people that need them.

Here’s how it works

 

Three step process

Setting up a custom document is a three step process:

  1. Create a template.
  2. Map your template to OpenForms.
  3. Attach mapped templates to automated emails.

As your form receives responses, OpenForms will use the templates you've attached to automated emails to pipe data into custom documents.

Process diagram

The resulting custom documents will be sent to the email recipients as attachments.

OpenForms will also store a copy of any custom documents that have been sent in your form's Response screen

Lets have a look at the steps involved.

Create a template

When you create a form, consider what documents you might want to generate from the response data.

Here's some common examples:

  • A receipt for any payments you’ve taken as part of a submission.

  • A certificate or permit that respondents have applied for through your form.

  • A standard letter that quotes information from a response. 

  • An exact duplicate of a paper form with the same purpose (so you can file your OpenForms and paper responses together). 

OpenForms generates these varied documents by piping response data into templates you've created yourself in Microsoft Word or Adobe Acrobat.

This gives you complete control over the design of your documents, right down to the file name.

However, you need to format these templates a particular way for OpenForms to work with them. 

Here's how:

Microsoft Word templates and Adobe PDF templates are formatted differently and suit different kinds of documents, so it's important to read through both topics above before you decide which template to create for your document(s).As you create a template, bear in mind what data OpenForms can pipe into custom documents.

Almost every kind of response data can be piped into a custom document, as well as a range of metadata. (Here's a full list). However, OpenForms currently doesn't support office use only fields in either response workflows or custom documents. 

If your custom documents require information that is only available after the respondent submits a form (such as a permit number for a generated permit) consider sending it to internal staff rather than directly to a respondent, so they can add that information manually. 

We are actively investigating office use only fields for response workflows and custom documents. If you'd like to talk about how you'd use that feature, reach out to us so we can incorporate your feedback into future development.

Map your template to OpenForms 

Once you have created a custom document template and formatted it to work with OpenForms, it's time to upload it and map your form fields to that template. 

Here's what you'll need to do:

  1. Upload your formatted template to OpenForms.
  2. Set up your template options.
  3. Map your OpenForms data to your template fields.
  4. Save your mapped template to the template library.

1. Upload your formatted template to OpenForms

To upload a formatted template file to OpenForms:

  1. Go to your form > Settings > Form documents.

    form settings.png
  2. Scroll down to Custom documents and select Upload a prepared template.

    form documents upload.png
  3. Enter a Template name.
    This is what your template will be called in your form’s template library and when you attach it to emails.

  4. Enter a Document Name
    This is what custom documents generated from this template will be called. You can pipe form data into this as you would into email subject lines.

  5. Drag and drop (or browse for) your template file in the Upload your template window.
    OpenForms will scan this file for viruses.

  6. Once the file is scanned, select Next.

    upload next.png

2. Set up your template options

Once you've uploaded a formatted template, you'll be taken to the Template mapping screen

template mapping screen.png

This is where you'll set up your template options and map your OpenForms data to the template you've uploaded. 
If you ever need to update your template options after you've set them, or adjust your template mapping, you can return to this screen through your form's template library.Before you start mapping your template, set your template options. 

At the top of this screen, you’ll see your template’s details - the name of the template file and the response and workflow emails it’s currently used in

used in - empty.png

If you’ve just uploaded your template, you’ll see that it’s used in zero emails, of course. But if you ever need to go back into this screen to make changes to a template that’s in use (to replace your template file with an updated design, for example), you’ll see that these have been updated.

used in - used.png

If your template file is used in any response emails or workflow emails, select either button for more details. 

used in anim.gif

Template options

template options.png

At the top right of the template mapping screen, you’ll also see some setup options for your template. These are:

Generate as

This dropdown is only available for Microsoft Word templates

Use this to select whether custom documents generated from your Word template are formatted as Word or PDF files. 

By default, this option is set to generate as PDF so you don't need to worry about respondents or staff being able to edit data. 

If you intend to send custom documents to internal staff for further edits, set this to Generate as Word.

Rename or upload template file Select the pencil icon to update the name of your template or document name, or update the template file (if you have updated the design or spotted a typo, for example).

If you’ve already fully mapped your template fields and upload a new template, you’ll only have to adjust the field mapping in OpenForms to the extent that it has changed. 

If a response is currently in workflow when you upload a replacement template, any emails that generate custom documents within the workflow using that template will use the existing file for the sake of consistency. 

Delete template

 

Select the bin icon to delete the template. This will remove the template from your form’s template library and remove it from any emails it is currently used in.

Even if a template has been deleted, any custom documents that have already been generated from it will remain available in the Responses screen

 

Download template file

This option is only available if you have already mapped and saved your template. 

If you want to make adjustments to your template layout or content, click the download button to download the current template file. After changing the file, use the pencil button to upload your updated template file.

Track template uploads in your form’s History screen.

 

3. Map your OpenForms data to your template fields

Below the template name and template options, you’ll see the Field mapping area, containing two columns marked Template field and Map to OpenForms field

field mapping empty.png

Use these two columns to map your OpenForms data to the template fields you've set up in your template file, so OpenForms knows where to pipe response data.

field mapping complete.png 

Simply match the template fields on the left to the OpenForms fields on the right to map your template.

Here's a bit more information on each of the columns:

Template fields The Template field column is presented in the order that fields appear in the template you’ve uploaded.

If you’ve given multiple fields in your template the same name (for example, if you’d like to use the same data in multiple places, or you’re piping in checkbox or radio button selections to a PDF template), you’ll only see those fields listed once in the template field column. (There’s no need to map the same field multiple times). 

Map to OpenForms field The dropdown options in the Map to OpenForms field column are presented in order of form metadata, followed by form fields as they appear in your form.

(For a full list of the data that can be selected in these dropdowns, see What data can be piped into custom documents.)

If your form contains any repeatable groups, we'll list every repetition of that field in this dropdown (up to the maximum repetitions you've set in that groups field settings), followed by a number. (For example, "contact details 1", "contact details 2", and so on).

If you'd like to if you'd like to pipe data from repeatable groups into your custom document, make sure you've included fields for every possible repetition in your uploaded template.

With a dropdown field open, you can search for particular OpenForms fields by typing the name you are looking for. This can save a lot of time when mapping lengthy templates.

If you’d like to start over at any stage, select Map to OpenForms field and choose Clear all mappings from the dropdown.

4. Save your mapped template to the template library

save mappings.png

Once you've finished mapping your template and setting up its options, select Save in the template mapping screen.

This will add your mapped template to your form's template library and return you to your form's setting screen. 

To access the template library:

  1. Go to your form > Settings > Form documents
    form settings.png
  2. Scroll down to the bottom of the Form documents screen
    template library location.png

In the template library, you’ll see a list of templates that have been saved to your form.

Each form can have up to twenty custom document templates in its template library.The template library lists the template name, when it was last edited (and by whom), and which workflow and response emails the template is used in. 

template library meatball menu.png


Select a template from this list to go to its template mapping screen, or select the ‘...’ menu to edit the mapping, download the template or delete the template. 
If you delete a template from your template library, it's deleted permanently. You can't restore it by reverting to a previous version of your form.

Attach mapped templates to automated emails

Once a mapped template has been added to your form's template library, you can attach it to your form's automated emails just like you would any other attachment.

attach anim.gif

The emails you might attach a template to depend on the purpose of the custom document you'd like to generate. 

For example:

  • If your form takes a payment, you might set up a submission confirmation email directed to the respondent, and attach a receipt template. This will send respondents an official receipt for their payment as soon as they submit a response.
  • If your form is an application for a permit, you might set up a workflow notification email for responses that have moved to an “approved” final step, and attach a permit template. You might direct this to both the respondent and your records department, so that both are automatically sent a permit once a reviewer has approved it.
  • If your organization needs to file online and paper responses together, you might set up a response notification email directed to your organization’s records department, and attach a template that matches your paper forms. 

When any of these emails are triggered, OpenForms will pipe response data into the template you've attached and send the completed custom document to the email recipient with the email. 

Custom documents can only be generated as attachments to automated emails, they can not be generated manually (to prevent documents bypassing a proper review process). If your template library lists a template as "not currently in use," custom documents can not be generated from that template. 

Here's a full list of the automated emails available in OpenForms:

Review sent documents

To review the custom documents that have been generated and sent for a form:

  1. Go to your form > Responses.
  2. Select a response from the Response list.
    responses filtered.png
    To search for a particular response, use the available filter options. 
  3. Expand the Form documents accordion.
    form documents accordion.gif
    This will display all of the custom documents that have been generated and sent for this response, as well as the default summary PDF
  4. Hover over a sent document to reveal additional options.
    form documents options.png
    To download a sent document, simply select it from the list, or use the download button.
    To delete a sent document, use the delete button.
  5. Alternatively, export all the custom documents for a response at once by selecting Download > Advanced export for that response.
    download advanced.png
    Or download all the custom documents generated for a form's response list by using Bulk actions > Export.
    bulk action export.png
    Both of these commands will allow you to include custom documents associated with a particular response or group of responses in a packaged download.
    advanced export.png
    This can be useful when downloading custom documents for archival purposes prior to purging responses to manage your organization's storage quotas

What's next

Was this helpful?