KoboToolbox Skip Logic in XLSForm: Relevant, Constraints and Choice Lists

How to write skip logic, answer constraints and reusable choice lists in an XLSForm for KoboToolbox, with a fictional practice form you can build and break on purpose.

How an XLSForm Is Laid Out

An XLSForm is a spreadsheet with three sheets that KoboToolbox reads as a form. You can build the same form in the web builder; the spreadsheet is faster for long forms and easier to review line by line. For a choice between Kobo and other tools, see KoboToolbox vs ODK vs SurveyCTO. All three read XLSForm.

SheetWhat it holdsKey columns
surveyOne row per question, note or grouptype, name, label, required, relevant, constraint
choicesThe answer options for select questionslist_name, name, label
settingsThe form title and IDform_title, form_id, version

Two rules prevent most upload errors. Names (not labels) must have no spaces and must start with a letter or underscore. And a select question's type names its list: select_one yes_no uses the choices with list_name yes_no.

Write the questions first. Question wording, order and length are covered in how to design a questionnaire; this page is about wiring the logic.

Frequently Asked Questions

How do I add skip logic in KoboToolbox?

In the form builder, open a question's settings and choose Skip Logic, then pick the controlling question, an operator and a value. In an XLSForm file, put the same condition in the relevant column, for example ${attended} = 'yes'. Questions are referenced by their name in the name column.

What does a dot mean in an XLSForm constraint?

The dot stands for the answer just entered. A constraint of . >= 15 and . <= 99 accepts ages from 15 to 99. Constraints are not checked on blank answers, so add required as well if the question must be answered.

Why is my choice filter showing no choices?

The filter column named in choice_filter must exist in the choices sheet, the values must match the earlier answer exactly, and the earlier question must be answered first. Check spelling and spaces in both sheets.

Try It in M&E Studio