Related fields can be grouped together to keep your form organised. Grouping fields also allows you to apply certain actions to all the fields at once (e.g. skip all the fields in the group based on a previously captured value, or repeat all the fields in the group).
You can rename, delete, reorder and add/remove repeats for groups in your form at any stage.
Add a new group
To add a new group to your form:
- Click on the Design tab for the form you wish to edit.
- Either click on the 'Add Field / Group' button at the bottom of the form, or
- Hover in between any field and click to add your group there. You can move the group to a different place later.
- Select 'Group' from the pop-up.
- The new group name (unique identifier) will be generated by default, but can be edited. This name will not be displayed to the fieldworker when completing the form, but will reflect in the Design and the Analytics tabs.
- Click the group label text to edit it. This text will be displayed to the fieldworker.
Once a group has been added, you can add fields inside your group, or drag existing fields into your group.
Delete a group
Deleting a group will remove all fields contained in the group. If any responses have already been received for any of the fields in the group, these will be archived but will still be available in the Analytics tab.
Note: if you accidentally delete a group, you can undo the action. However, once you've published your changes, you will not be able to reinstate the deleted group.
To delete a group from your form:
- Click on the group that you want to delete.
- Select the 'bin' icon on the right-hand side.
- Confirm that you want to delete this field.
All fields within a group can be skipped or shown based on skip logic applied at the group level.
Fields and groups will be displayed on the handset in the order that they appear on the console (unless you have added skip logic to adjust this order). You can easily reorder groups and the fields within them by clicking on the field or group and dragging it to where you want it to appear.
Alternatively, you can also reorder groups using the navigation panel on the left-hand side by clicking and dragging it to a new place, even across pages.
Note: When reordering fields and groups, make sure that any skip logic that you have applied previously still make sense.
Groups can contain any number of fields and/or other groups. Groups within groups are referred to as 'nested groups' and can be created as described above by hovering your mouse between the fields in your existing group and clicking to add another (1). Groups and nested groups are indicated by a bold brace on the left of the fields they contain (2).
Note: it is not recommended to add more than 3 levels of nested groups as it will affect the readability on the handset.
Nested groups will display on the handset as follows:
When you allow repeats for a group you can ask the same set of fields multiple times without having to know exactly how many repeats you will need before the form is started by the fieldworker.
For example: You need to visit multiple households and capture the name and date of birth of each household member living there. The size of each household varies greatly and it is impossible to predict what the maximum number of household members in any household will be.
To enable repeating groups:
- Click on the group you wish to repeat.
- Select the 'Allow repeats for this group' option on the Basics tab (1).
- The repeating group indicator in the top right of the group will be highlighted to show that repeats are allowed for this group.
To disable repeating groups:
- Click on the group you wish to disable repeats for.
- De-select the 'Allow repeats for this group' option on the Basics tab.
- The repeating group indicator in the top right of the group will turn grey to show that repeats are not allowed for this group.
On the handset, repeating groups are indicated by a blue background. The repeat number is indicated at the top of the repeat block (1). The fieldworker can repeat the set of fields by clicking 'Add repeat' at the bottom on the group (2). If the fieldworker makes a mistake by adding too many repeats, they can delete a repeat by clicking the bin icon next to the repeat number (3).
Referring to the current repeat number
If you want to keep track of which repeat a field is referring to, you can type =repeat-index() into the display text. When the form is displayed on the handset, this will be replaced by the number of the repeat as shown below.