====== Extended Selection ======

The extended selection is a selection question with extended possibilities for options. When compared with a [[:en:create:questions:select|normal selection]], the following features are available:

  * Hierarchical composition of options (selection list with subheadings or selection trees)
  * More than 99 options
  * Dynamic customization of options using the [[:en:create:databank|Database for Contents]] (however, this is not possible if multiple choice is allowed)
  * Specification of your own (numeric) answer codes for options

However, the advantages this question offers also have some limitations:

  * It cannot be used in a [[:en:create:combine|combined question]].
  * Arranging options in multiple columns is not possible.
  * Open text inputs (e.g. for "Other") cannot be added automatically. Instead, these have to be added manually by [[:en:create:inputs-single|placing input fields freely]].

**Tip** An existing //Selection// or //Dropdown Selection// question can be directly converted into an extended selection in the //Extended// tab. Activated open text input fields may be lost in doing so. Converting an extended selection into a normal selection question is __not__ possible.


===== Input Options =====

In an extended selection, options are not created -- as you are used to -- in the List of Questions on the left-hand side, or in the Quick Input for Options. Instead, they are entered in a multi-line text field, where the desired answer code for each one is written as a number before the text. 

If you want to categorize the options, simply indent the subordinate answers. Characters that can be used do so are space, minus (''-''), tab etc. This means options can be indented manually or copied from a spreadsheet.

**Tip:** If is answer code is not assigned, SoSci Survey does this automatically once the question is saved. 

**Note:** Subheadings are also given an answer code if they were defined as non-selectable. 


{{:de:create:questions:scr.extselect.options.direct.png?nolink|Directly Input Options}}

{{:de:create:questions:scr.extselect.options.result.png?nolink|Result of Above Input}}


===== Forms of Display =====

The extended selection supports options being displayed in a drop-down, as well as in a visible selection. Depending on the version, other layout options can be selected.

**Note:** Only 2 levels of classification (headings and options) are allowed in the drop-down selection. This limitation does not apply to the visible selection.

For visible options, you can choose to set whether all options are shown at the same time, or whether supercategories are shown first, which ("expand") by clicking on the options. If the participant has disabled [[:en:glossary#javascript|JavaScript]], all options will be displayed. 

{{:de:create:scr.question.extselect.dropdown.png?nolink|Extended Selection as a Dropdown}}

{{:de:create:scr.question.extselect.radio1.png?nolink|Extended Selection with a Dynamic Display}}

{{:de:create:scr.question.extselect.radio2.png?nolink|Extended Selection with Visible Options}}


===== Options from the Database =====

In special cases, you may want to dynamically adjust the options during the course of the survey -- for instance, when collected data is imported from an external data source. 

The extended selection can access the [[:en:create:databank|Database for Contents]] in order to do this. If a prefix for the database key is defined in the question, all entries from the database beginning with this prefix will be placed for selection.

**Note:** Dynamically reading options is not possible if the question allows multiple responses.

**Note:** Entries from the database are always displayed before the options directly entered.

In order to use entries from the internal database for the //extended selection//, you need at least 2 columns next to the key: one for the numeric answer code, and one for the option's text.


^Key^0^1^
|A0001|1|apple|
|A0002|2|pear|
|A0003|3|clementine|
|A0010|4|date|


Adding an additional column allows you to set indentations for a hierarchical display.

^Key^0^1^2^
|A0000|99|fruit|0|
|A0001|1|apple|1|
|A0002|2|pear|1|
|A0003|3|clementine|1|
|A0004|4|date|1|
|A1000|98|vegetables|0|
|A1001|1|anchovy|1|
|A1002|2|green salad|1|
|A1003|3|quinoa|1|