How to Set and Format Dynamic Tab Titles in Dynamic Panel
About Dynamic Panel
Dynamic Panel is a question type that allows you to create a set of grouped questions or form fields that a respondent can dynamically duplicate. When respondents are filling out a form, they see the initial group of fields within Dynamic Panel. If they need to add another set of responses, they click the "Add new" button which generates an additional group of fields identical to the first. They can add as many extra sets or fresh copies of these fields as needed to provide all necessary information. This question type is particularly useful in scenarios where the number of responses or entries cannot be predetermined.
Imagine a survey collecting data on projects that employees have worked on. Instead of having a fixed number of project fields, Dynamic Panel allows each employee to add as many project entries as necessary. Another example is a course registration form that collects data on courses a student wants to enroll on.
Tab View
Dynamic Panel's Panel display mode property located under General allows you to choose how panels with nested fields are placed in relation to each other and how they are navigated by a respondent.
When the Panel display mode is set to Tabs, each panel is represented by a tab. Panels are navigated using tab titles. This mode allows respondents to easily switch to any panel by clicking on the corresponding tab title.
Panel Count
Dynamic Panel includes the following settings that allow you to manage the number of panels:
Initial panel count
Specifies the number of panels that are initially displayed when the form is first loaded.Minimum panel count
Specifies the minimum number of panels that must be filled out. This setting ensures that at least a certain number of entries are collected before the form can be submitted.Maximum panel count
Specifies the maximum number of panels that can be added by the respondent. This setting restricts the total number of panels, preventing respondents from adding more than the specified limit.
Tab Title
As mentioned earlier, dynamic panels are navigated using tab titles. The Tab title pattern property allows you to create a pattern for dynamically generated tab titles.
Dynamic Panel Numbering
You can change the default panel title format by assigning each new panel a number. To do this, follow the steps below:
- Add a Dynamic Panel to the design surface.
- Under General, locate the Panel display mode property and set it to Tabs.
- Locate the Tab title pattern field.
- Enter
{panelIndex}
.
You can also add any text before or after the panel index. For example, if each panel represents a course, setting the Tab title pattern property to Course #{panelIndex}
will result in panel titles look as follows:
Dynamic Panel Title Pattern
It's easier for respondents to navigate through tabs if each tab is titled using a value they entered in one of the panel fields. For example, if they are listing places of employment, each tab title can be generated using the data entered into the "Employer name" field. Another example is using a "Course name" value to generate a tab title for each selected course.
To generate a dynamic panel title that uses a user's response to one of the panel fields, follow the steps below:
- Add a Dynamic Panel to the design surface.
- Populate it with questions.
- Decide a response to which question you want to use as a dynamic panel title.
- Assign this question a Question name and a Question title.
- Make the question Required to make sure it receives an answer.
- Select the Dynamic Panel.
- Under General, locate the Tab title pattern property.
- Enter the following sample value:
{panel.course-title}
, wherecourse-title
is the Question name value of the source question for the dynamic title. - Optionally, align the tab title to the left, center, or right using the Tab alignment property.
- Set a static value for the Tab title placeholder property. This value will be used if the dynamic tab title pattern doesn't produce a meaningful result or if the source question has not yet been answered.