XLS Form Question Types
XLSForm supports a number of question types. These are just some of the options you can enter in the type column in the survey worksheet in your XLSForm:
|Question Type||Answer Input Format|
|integer||Integer (i.e., whole number) input.|
|text||Free text response.|
|select_one[options]||Multiple choice question; only one answer can be selected.|
|select_multiple[options]||Multiple choice question; only one answer can be selected.|
|rank[options]||Rank question; order a list.|
|note||Display a note on the screen, takes no input.|
|geopoint||Collect a single GPS coordinate.|
|geotrace||Record a line of two or more GPS coordinates.|
|geoshape||Record a polygon of multiple GPS coordinates; the last point is the same as the first point.|
|dateTime||Accepts a date and a time input.|
|Image||Take a picture or upload an image file.|
|audio||Take an audio recording or upload an audio file.|
|video||Take a video recording or upload a video file.|
|file||Generic file input (txt, pdf, xls, xlsx, doc, docx, rtf, zip)|
|barcode||Scan a barcode, requires the barcode scanner app to be installed.|
|acknowledgement||Acknowledge prompt that sets value to “OK” if selected.|
|hidden||A field with no associated UI element|
|xml-external||Adds a reference to an external XML data file.|
Multiple choice questions
XLSForm supports both select_one (select only one answer) and select_multiple (select multiple answers) questions. Writing a multiple choice question requires adding a choices worksheet to your Excel workbook. Here is an example of a select_one question:
|select_one yes_no||likes_pizza||Do you like pizza?|
Note that the yes_no in the survey worksheet must match the yes_no in the list name column in the choices worksheet. This ensures that the form displays the correct list of answer choices for a particular question.
We can also add multiple choice questions that allow multiple answers to be selected, like so:
|select_multiple pizza_toppings||favorite_toppings||What are your favorite pizza toppings?|
For multiple choice questions, surveys often include an option of marking other when their answer choice is not listed. Then they are usually asked to specify the other option. This is possible through XLSForm by including or_other after the answer choice list name in the survey worksheet. The choices worksheet stays the same. See below:
|select_multiple pizza_toppings or_other||favorite_topping||What are your favorite pizza toppings?|
Click to look at the complete pizza_questionnaire.
When you export data using this or_other option, in the favorite_topping column, you will see a value other. A separate column will have the answer for the questions in which the user selected other. This makes data analysis more cumbersome, so we do not recommend the or_other construct for large scale data collection efforts. See the Relevant section below for an alternative method more appropriate for large scale projects.
The rank widget can be used to let respondents order a list of options. The answer is saved as an ordered, space-separated list of option values where all options are always included. The syntax is very similar to multiple-choice questions.
|rank pizza_toppings||toppings||Order pizza toppings with your favorite on top|
To prevent bias it is often recommended to use the randomize feature in conjunction with this widget.