Randomization within a Form
About Randomization
Randomization is a feature that allows you to display form elements, such as questions, matrix rows, and choice options, in a different order each time a user opens the form. This can be especially useful for forms or surveys aiming to reduce response biases, as it prevents respondents from anticipating the order of items.
With SurveyJS, you can randomize question order at various levels, from all questions within a form to those on a specific page or panel. This setting can also be applied to choice options in a single- or multi-select question (for instance, Dropdown, Checkboxes, Radio Button Group) or to rows in a Single-Select Matrix.
How to Randomize Questions in a Form
By default, questions within a form appear in their original order. To randomize the order of all questions in a form, follow the steps below:
- Open the survey-level settings in the form structure tree.
- Under the Question settings category, find the Question order setting.
- Set this setting to Random.
- To see the randomized order in action, switch to the Preview tab.
How to Randomize Questions within a Page
To display questions on a specific page in random order, do the following:
- Select the page you wish to modify in the form tree or click it directly on the design surface.
- Under the Question settings category, locate the Question order on the page setting.
- Set this setting to Random.
- View the changes by switching to the Preview tab.
If you choose the Inherit option, questions on the page will follow the question order set on the survey level.
How to Randomize Questions within a Panel
SurveyJS allows you to group multiple questions into a panel for easier management. You can randomize the order of questions within a specific panel as follows:
- Select the panel you wish to modify in the form tree or click it directly on the design surface.
- Under the Question settings category, find the Question order within the panel setting.
- Set this setting to Random.
- Go to the Preview tab to view the effect.
How to Randomize Choice Options
The following question types support choice randomization:
- Radio Button Group
- Checkboxes
- Dropdown
- Multi-Select Dropdown (Tag Box)
- Image Picker
- Ranking
Follow the steps below to randomize choices for those question types:
- Select the question you want to modify in the form tree or click it directly on the design surface.
- Under the Choice Options category, locate the Choice order setting.
- Select Random from the drop-down menu.
- Switch to the Preview tab to view the randomized choice order.
Other Choice order options include:
- Ascending - Displays choices in ascending order (numerically or alphabetically).
- Descending - Displays choices in descending order (numerically or alphabetically).
- None - Maintains the original order of choices.
How to Randomize Rows in a Single-Select Matrix
Matrix rows appear in their default position unless they are randomized. To shuffle rows each time the form is loaded, follow these steps:
- Select the Single-Select Matrix question in the form tree or click it directly on the design surface.
- Under the Rows category, find the Row order setting.
- Set this setting to Random.
- Preview the effect by switching to the Preview tab.
Row randomization is unavailable for Multi-Select and Dynamic Matrices.