Generate multiple choice alternatives, based on the answers in a repeat

As of pyxform v1.3.1 and XLSForm Online v1.3.1, it is now possible to create a select from a repeat. The documentation is available here. We expect this will be released in Central within the next 2 weeks. This new feature produces exactly the same result as the example XForms modification I shared.

Use it with question type select_one ${field_in_repeat} where ${field_in_repeat} is the field you want to use for your select options. Note that the same text used to display each choice will also be used as the value that you will see in the data used for analysis and that it may contain spaces. This functionality is currently only supported for select_one (not select_multiple).

Other select features such as choice_filter are supported. select-one-from-repeats is a working example.

3 Likes