Support

Adding Cascading Select Questions

Last Updated: May 15, 2016 12:25PM EDT

Cascading select questions are sets of questions whose options depend on the response to a previous question. For example, your form may first ask the region where a respondent is from, and then in the next question list only the towns and villages from that region.

Adding sets of cascading select questions to your form can be done by importing them to a draft form in the formbuilder or adding them manually to an XLS Form and then uploading that file. 

Importing cascading question sets in the formbuilder

(Note that this is only available in the new Beta version of KoBoToolbox.)

Importing cascading questions into the formbuilder
  1. Open Excel or another spreadsheet program and create your template of questions and responses to be added. 
  2. Follow this template as an example and follow the instructions in the template. 
  3. Select and copy the whole cascading table template, then paste it into the Import Cascade, then click Done to import it. (If there were any mistakes in the formatting you will not be able to import the set - correct any formatting mistakes and make sure you followed the template instructions.)
  4. You can move the imported questions anywhere in your form and change the labels of both the question and responses and delete responses.
  5. If you want to add additional respones to the cascading list just delete the imported questions and import a new list from your spreadsheet.     

Adding cascading question sets in XLS Form

  1. (If you have an existing form, download it as XLS to your computer and open it in Excel or another spreadsheet program).
  2. In the survey sheet, add new lines for the questions you'd like to add, following this template.
  3. In the same sheet, add a column called choice_filter and add the XLSForm reference to each of the parent items.
  4. In the choices sheet of the file add all the options you would like to appear in the different questions, e.g. the lists of states, counties, and cities (follow the above template).
    ‚Äč
  5. Note that for each of the child elements you need to add a column to specify its parent. For example, King and Pierce counties are in Washington state, so you would write 'washington' into the 'state' column for these two counties.
  6. Save your form. In KoBoToolbox open the main menu and click on Projects. From here you can upload and deploy your form directly, including the newly added cascading select questions.


Note that you can also build cascading select question sets with Select Multiple questions. Because these questions can have more than once response, the text in the choice_filter column needs to be slightly different from the above example: 
choice_filter
...
selected(${state}, state)
selected(${state}, state) and selected(${county}, county)
http://assets3.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete
Our help pages have moved. Please visit http://help.kobotoolbox.org