Template-Based Sections allow users to quickly and easily create and edit groups of questions that follow a repeated pattern. These kinds of repeated sets of questions are often seen in inspection, audit, or checklist-based forms.
For the form-builder, template-based sections are a powerful tool. You can:
- save time when form building,
- create more consistent forms for your mobile users,
- save time when updating: you can update entire sets of questions with a single edit.
For mobile users, template-based sections appear no different than standard sections, but are more consistent overall.
This article will give an overview of how these template-based sections work and where they're most commonly found in forms.
As mentioned above, the most common types of forms that benefit from template-based sections are inspection, audit, and checklist forms. These forms have multiple sets of the same kinds of questions, some with questions that are conditional on how a user answers previous questions, which would require a person building forms to configure the conditional logic for each question.
Without template based sections, you would have to:
- manually define every single question on every single inspection item,
- set up a conditional logic rule for each conditional question,
- test every single conditional logic rule,
- and, when updating a form, edit every single question to reflect new language or configurations.
With template-based sections, you can set up a single template that:
- has all the questions required within it,
- has conditional logic rules to show or hide certain questions based on previous answers,
- can be updated in one place, and have all the changes reflected in any sections based on that template.
An example of an Inspection Form is given below:
Template-based sections are sections containing repeated question blocks based on a template. This makes it easy to quickly build and edit forms with a repeated structure. Most inspection forms are full of repeated questions and structures. An example is provided in Use Cases above.
A Template is the pattern that the Template-Based Section follows. If multiple sections follow the same pattern, they can use the same template. For more information on templates, please read: Managing Templates.
Question Blocks are the building blocks of template-based sections. Rather than adding questions to a section in the form builder, you add question blocks based on those in the Template. You can also use conditional logic to affect questions in a Question Block without having to configure multiple conditional logic rules: you can have hundreds of question blocks and only one conditional logic rule. For more details on how to build Template-Based Sections, please read: Building Template-Based Sections
Building forms using Template-Based Sections just involves adding Question Blocks, which are copies of the questions and logic set up in a Template, with the opportunity to rename questions with unique text.
In our sample inspection form, we have four repeated questions: Rating, Reason, Comments, and Picture.
Therefore, we would first create a template with Template Questions containing:
- Rating: a Button Group question with the appropriate rating (Pass/Fail/N/A), listing what is to be inspected.
- Use Additional Comments to conditionally show a comments field on certain answers.
- Reason: A text box question.
- Picture: A Photo or Sketch Pad question.
We can then add a Conditional Logic rule to:
- show or hide the Reason question depending on the answer to Rating.
- show or hide the Photo question depending on the answer to Rating.
We can then duplicate these questions as question blocks throughout the form for each inspection item rather than having to build each question separately.
Now, imagine that you have to add another option to the Button Group question (such as N/A) -- you can go back to the template, make the change in one place, and all the blocks based on that template will be instantly updated.