Groups and conditions
A group wraps part of the form so it shows or hides depending on what visitors pick or type.
- In the Form tab, select the code to put in the group.
- Right-click it and choose Wrap in group, or press Ctrl+G (⌘G on a Mac). The code gets a dashed box with a Group: chip at the top. Drag that chip to move the whole group.
- Click that chip. In the sidebar, under When the rules match, pick Show this group or Hide it, and under Rules that must match, All of them or Any one.
- Click Add rule and pick a field, an operator and a value. For select, radio and checkbox fields, you pick the value from that field’s options.
The operators are: is, is not, contains, doesn’t contain, is empty, isn’t empty, is more than, and is less than. A group with no rules always shows. Groups can sit inside other groups. Ungroup removes the group and keeps the code inside it.
What a hidden group does
The page hides the group as visitors fill in the form, and the server checks the same rules again when the form is sent. Fields in a hidden group:
- aren’t checked, so a required field there doesn’t block sending;
- aren’t saved in the entry;
- give empty mail tags.
In a mail, text between [group:name] and [/group:name] is printed only when that group was shown.
Let visitors add more rows
A group can repeat, so visitors add as many copies of it as they need: guests, products, rooms. Tick Visitors can add more of these in the group’s sidebar.
| Setting | What it does |
|---|---|
| Rows at least | How many rows the form starts with and keeps. 1 if you leave it. |
| Rows at most | Where the Add button stops. Empty: up to 50. |
| Add button | Its text. Empty: “Add another”. |
| Remove button | Its text, on each row. Empty: “Remove”. |
The group’s own rules still show or hide it as a whole. A group inside a repeated one always shows, and a repeated group inside another one doesn’t repeat by itself. A rule elsewhere that reads a field of the rows matches when any row matches.
What visitors fill in arrives row by row. For a group named guests with a field guest:
[guest]in a mail lists every row’s value: “Bob, Eve”.[guests]prints the rows: a table in an HTML mail, a line per row in a plain one.- Text between
[group:guests]and[/group:guests]is printed once per row, its[guest]being that row’s value. - The entry shows the rows as a table, and webhooks get them as a list:
"guests": [ { "guest": "Bob" }, … ].
A Quiz, a payment field or a Calculation field can’t go in a repeated group. Your theme can change the rows and buttons: see Styles and templates.