Choice filters (Casacade)
Last updated
Was this helpful?
Choice filters allow you to dynamically filter the options shown in a select_one or select_multiple question based on the answer to a previous question.
They are useful when you have linked dropdowns, such as showing cities based on the country selected, or filtering job titles based on department.
To use a choice filter, follow these steps:
In the survey sheet, add a column named choice_filter.
In the choices sheet, add an extra column with the filtering attribute.
The choice_filter expression in the survey sheet must match the filter value from the selected answer.
The syntax for the filter is:
filter_column = ${question_name}
This compares a column in the choices sheet to the value selected in a previous question.
Choice filters will only work on the select_one if its defined within group that defines a page with the field-list appearance. It will not work within a group that doesnt have a field-list apperance
survey sheet
select_one country
country
Select a country
select_one city
city
Select a city
country = ${country}
choices sheet
country
usa
United States
country
france
France
city
nyc
New York City
usa
city
la
Los Angeles
usa
city
paris
Paris
france
city
lyon
Lyon
france
What happens:
The user selects a country in the first question (e.g. France).
The second question (Select a city) only shows cities where the country column in the choices sheet matches the selected country (france in this case).
So only "Paris" and "Lyon" will appear in the city dropdown.
Last updated
Was this helpful?
Was this helpful?