Previous Next

To open or use this sample form, go to the Design tab, scroll down to the Your forms and datasets section, and click + then Start new form; then enable Use a sample form as your starting point and choose Cascading selects: Filtering multiple-choice option lists from the list. You can also click here to download the spreadsheet form definition.

When you open the spreadsheet form definition, you will see a series of three multiple-choice questions in the middle of the form:

typenamelabelchoice_filter
select_one regionsurvey_regionIn which region are you filling out this survey? 
select_one countrysurvey_countryIn which country?filter=${survey_region}
select_one citysurvey_cityIn which city?filter=${survey_country}

You may need to scroll right to find the choice_filter column, which is highlighted in orange. For any select_one or select_multiple field, the expression in this column specifies how to filter the available choices based on earlier responses (see Dynamically filtering lists of multiple-choice options for a complete discussion).

In this form, the choices sheet, which lists all possible answer options for multiple-choice questions, has an additional filter column:

list_namevaluelabelfilter
regionAFAfrica 
regionSASouth Asia 
countryZWZimbabweAF
countryZASouth AfricaAF
countryINIndiaSA
countryBDBangladeshSA
cityHarareHarareZW
cityBulawayoBulawayoZW
cityPretoriaPretoriaZA
cityCape_TownCape TownZA
cityNew_DelhiNew DelhiIN
cityChennaiChennaiIN
cityDhakaDhakaBD
cityChittagongChittagongBD

The values in that filter column are referenced in the choice_filter expressions on the survey sheet, so the expressions and the values work hand-in-hand. So, for example, the choice_filter expression for the "In which country (are you filling out this survey)?" question is "filter=${survey_region}", and the filter values for the country options are "AF" and "SA", which match the values for the region choice options.

If the user selects "South Asia" for region, for example, then this is the next question that will appear:

And if the user then selects "Bangladesh", this will be the next question:

If the user instead selects "Africa" as the region, this is how the next question will appear:

And if the user then selects "South Africa", this will be the next question:

You can see that the questions remain constant; the only things that change are the answer options, which are filtered based on previous responses.

Previous Next