Using subforms in Incontrol allows directing the user while filling out the form. Based on a selected answer, a follow-up question is generated. For example, if the question is whether a component is okay or not, a photo or comment may be requested when a negative answer is given.
Explanation
It's possible to set up a subform with the following choice elements:
- Audit
- Checkbox
- Checkbox (images)
- Checklist (text)
- Dropdown
- Yes/No
- Multiple choice (images)
- Multiple choice (text)
- Rating
Additionally, it's also possible to set up subforms with the following numeric elements:
Setting up a subform for choice elements
Subforms can be added to an element in two ways. You can add the subforms while editing the element itself, or by clicking on the plus sign at the bottom of the element in the full overview of the form builder.
Adding a subform from the element itself
- Open the Form Builder.
- Add one of the above choice elements to your form.
- Edit the element and add some options for the end user to select.
- For a choice option, you can add a subform as indicated in the image below:
- You will now see two or more options:
- "Don't show subform for this answer"
- "Add a new subform for this answer"
- If you've already created subforms, you'll also see them.
- Select the second option to add a new subform.
- A new window will open.
- For choice elements, you will always see the choice option to give a name to your subform. Enter a name for the subform here, so you can easily find it later.
- Click 'Add' when you're done.
- You'll now see that the subform has been created and linked to your choice option.
- You can also link the subform to other choice options if you wish.
Adding a subform from the Form Builder
You can also easily add a subform from the Form Builder. This is also the screen where you can delete a subform.
- Open the Form Builder.
- Add one of the above elements to your form.
- From the Form Builder, you can press the plus button next to the element where you want to add a subform.
- When you press this, you'll see the same pop-up as in the steps above.
- Enter the name of the subform here and press 'Confirm'.
- The element will open, allowing you to directly link the subform to the various choice options.
- Press 'Save' when you're done editing
- If everything went well, you should now see a similar screen in the Form Builder.
- If you've created multiple subforms, they will be displayed as separate tabs.
- Under the tab, you can add rows. Everything placed in the tab will be shown when the subform is called.
Setting up a subform for numeric elements
Adding subforms for numeric elements works the same way as for choice elements. In this section, we'll only highlight the differences.
Adding a subform
- Open the Form Builder.
- Add a numeric element to your form.
- You can use subforms with any input method of a numeric element.
- User input
- Read-only number
- Calculation
- For a calculation element, you only have a "Read-only" value.
- Now you can add a subform in two ways:
- Via the "+ Value" button
- Via the "Import" button
- "+ Value" button
- Click on the "+ Value" button.
- Enter the 'comparison' with which you want to show the subform. You can choose from:
- less than
- less than or equal to
- equal to
- not equal to
- greater than or equal to
- greater than
- Select one of the above and enter the 'value'.
- Add a subform as you learned in earlier steps in this article.
- Import
- Click on the "Import" button.
- You can now specify different comparisons, but also specify complex comparisons.
- For example, you'll always see "x = 0"
- Here you can enter the comparisons. Note: if you have multiple comparisons, separate them with an enter.
- You can use the following components here:
- <, for less than
- <,= for less than or equal to
- = for equal to
- != for not equal to
- >,= for greater than or equal to
- >, for greater than
- OR for OR statements (show subform if x is equal to 3 or equal to 5)
- AND for AND statements (show subform if x is greater than 0 and less than 4)
- You can use aliases from other elements (show subforms if x is equal to @alias)
- For example, you can have the following comparisons:
- Press the "Import" button when you're done.
- Now add the subforms you want to link to the comparison.