Search the knowledge base, browse our resources, and visit our forum for more detailed information
Last updated: 25 Nov 2025
Grouping questions in XLSForm helps organize related content into clear, structured sections, improving form layout and navigation. For example, you can group all demographic questions into one section.
XLSForm makes it easy to create groups and nested groups, and to apply skip logic to entire question groups. Group-level skip logic streamlines the respondent’s experience by showing only relevant sections based on previous answers.
This article covers the following topics:
Creating question groups and nested groups in XLSForm
Displaying all grouped questions on a single page
Adding skip logic to question groups
Note: This article focuses on grouping questions in XLSForm. To learn about grouping questions in the KoboToolbox Formbuilder, see Grouping questions and repeating groups.
To create a question group in XLSForm:
In the type column of the survey worksheet, enter begin_group to indicate the start of the group.
In the name column of the begin_group row, enter the unique identifier for the group.
In the label column, enter the title of the group as you want it displayed in the form. The label is optional and can be left blank.
Enter each question of the group in its own row, as you normally would.
In a new row after the grouped questions, enter end_group in the type column to indicate the end of the group.
In the end_group row, leave the name and label columns blank.
survey worksheet
type |
name |
label |
|---|---|---|
begin_group |
personal_info |
Section A: Personal Information |
text |
name |
What is your name? |
integer |
age |
How old are you? |
select_one yn |
married |
Are you married? |
end_group |
||
survey |
Nested groups are groups of questions inside another group of questions. Nested groups can be used to create a hierarchical structure within your XLSForm. For example, you can include a group of questions about a child inside a larger group of questions about the household.
When creating multiple groups, ensure that each begin_group row has a corresponding end_group row. If the number of begin_group rows does not match the number of end_group rows, the form will generate an error, preventing it from functioning properly during preview or deployment.
survey worksheet
type |
name |
label |
|---|---|---|
begin_group |
personal_info |
Section A: Personal Information |
text |
name |
What is your name? |
integer |
age |
How old are you? |
select_one yn |
married |
Are you married? |
begin_group |
education |
Education |
select_one yn |
student |
Are you currently a student? |
select_one edu |
education_level |
What is the highest level of education you have completed? |
end_group |
||
end_group |
||
survey |
In XLSForm, question groups can be repeated to collect the same set of responses multiple times within a form. This is useful when gathering similar information about multiple people, items, or events. Repeated groups are called repeat groups.
To learn more about setting up repeating groups of questions in XLSForm, see Repeat groups in XLSForm.
A common reason to group questions is to display them together on a single page. You can adjust the group’s appearance settings to control how grouped questions are shown during data collection. The steps vary depending on whether you are using KoboCollect or Enketo.
Note: Appearance settings to display groups on a single page work both for question groups and repeat groups.
By default, KoboCollect displays each question on a separate screen. Users must move manually from one question to the next.
To display all grouped questions on the same screen in KoboCollect:
In the survey worksheet, add an appearance column.
In the appearance column, enter field-list in the begin_group row.
Each question group will now appear on its own page.
survey worksheet
type |
name |
label |
appearance |
|---|---|---|---|
begin_group |
personal_info |
Section A: Personal Information |
field-list |
text |
name |
What is your name? |
|
integer |
age |
How old are you? |
|
select_one yn |
married |
Are you married? |
|
end_group |
|||
survey |
By default, Enketo web forms display all questions on a single page.
To display each group of questions on its own page in Enketo web forms:
In the settings worksheet, add a style column.
In the second cell of the style column, enter pages.
This applies the pages theme to your Enketo web form, dividing it into separate pages similar to KoboCollect.
settings worksheet
style |
|---|
pages |
settings |
In the survey worksheet, add an appearance column.
In the appearance column, enter field-list in the begin_group row.
Each question group will now appear on its own page.
survey worksheet
type |
name |
label |
appearance |
|---|---|---|---|
begin_group |
personal_info |
Section A: Personal Information |
field-list |
text |
name |
What is your name? |
|
integer |
age |
How old are you? |
|
select_one yn |
married |
Are you married? |
|
end_group |
|||
survey |
Applying skip logic to question groups ensures that only relevant sections appear based on earlier responses. For example, in a household survey, you can use skip logic to show a group of questions for the head of household only when a previous question identifies the respondent as such. This makes the form easier to navigate and more responsive to user input.
To apply skip logic to question groups in XLSForm, use the same approach as you would for individual questions:
Add a relevant column to your survey worksheet.
In the relevant column for the begin_group row, enter the condition that determines when the group should be shown.
If the condition is met, the entire group will be displayed. If not, the group will be hidden.
This helps control the flow of your form so that only relevant sections appear based on earlier responses, making the form more streamlined and responsive to user input.
Note: Skip logic can be applied both for question groups and repeat groups. To learn more about skip logic in XLSForm, see Adding skip logic in XLSForm.
Did you find what you were looking for? Was the information clear? Was anything missing?
Share your feedback to help us improve this article!
KoboToolbox is maintained by Kobo Inc.