It is possible to set up a Field Group to be repeated several times, as well as added or removed by the end-user. This is useful in cases when the user must enter several options of the same data, such as previous residency addresses, employment history, education history, phone numbers, several dependents, several account owners, and so on. Even you only have one field that needs to be repeated in this way, you must enclose it in a Field Group.
Repeatable Field Groups must use an index counter within the Meta field name pattern to distinguish between the groups. An index counter can be used in the visualized parts of the field group as well, for example, in the Field Label at the top of Field Group, or in Custom Content that is displayed at the bottom of the group below all grouped fields.
By changing different Repeat settings of a Field Group you can set:
- the number of times that the group is initially displayed (Number of repetitions)
- whether the user can add more repeated versions of the group with the Add button (Allow adding)
- how many additional groups the user may add to the list (Maximum repetitions)
- when the user deletes unnecessary repeated groups, how many of them must remain (Minimum repetitions)
In the example below, the wizard will have a Primary Beneficiaries section, where several beneficiaries can be added, but no less than one and no more than four.
Step | Result | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Create a page first with a section labeled Primary Beneficiaries and one Field Group. | | ||||||||||||||||||
Field | Value | |||||||||||||||||||
2 | Field Label |
| ||||||||||||||||||
3 | Name |
| ||||||||||||||||||
4 | Meta field pattern |
| ||||||||||||||||||
5 | Repeat | Selected | ||||||||||||||||||
6 | Number of repetitions | 1 | ||||||||||||||||||
7 | Allow adding | Selected | ||||||||||||||||||
8 | Add button label | Another Beneficiary | ||||||||||||||||||
9 | Remove button label | Leave empty. | ||||||||||||||||||
10 | Maximum repetitions | 4 | ||||||||||||||||||
11 | Minimum repetitions | 1 | ||||||||||||||||||
12 | Add several fields to the group:
|
| ||||||||||||||||||
Field Type | Settings | |||||||||||||||||||
13 | Single Text |
| ||||||||||||||||||
14 | Single Text |
| ||||||||||||||||||
15 | Single Text |
| ||||||||||||||||||
16 | Single Selection |
| ||||||||||||||||||
17 | Date and time |
| ||||||||||||||||||
18 | Single Text |
| ||||||||||||||||||
19 | Single Text |
| ||||||||||||||||||
20 | Domain Single Selection |
| ||||||||||||||||||
21 | Single Text |
| ||||||||||||||||||
22 | Exit the Field Group editing mode by clicking on the page name in the Page Tree. |
| ||||||||||||||||||
23 | Click Apply button in the bottom of the screen to close the Widget Design Screen and apply changes. Then click Save button in the top of the Widget Details Screen to save these changes. |
| ||||||||||||||||||
24 | Test the widget by opening it. There should be one instance of the Primary Beneficiaries field group visible. | | ||||||||||||||||||
25 | Click Another Beneficiary at the bottom of the screen. An entry for a second beneficiary appears. You may add up to four entries. If necessary, you can delete either one of the entries, by clicking on the X. | |