Desktop User Guides > Professional > Interview scripting > Interview scripting reference > Default templates > Default question template > Drop-down lists and list boxes
Drop-down lists and list boxes
Categorical response lists can be displayed as drop-down lists or list boxes. The HTML code for these types of response lists is as follows (the code in square brackets is present for list boxes but not drop-down lists):
<span style="display: inline-block;">
  <select [size="NumLines" multiple=""] name="Ref"
        class="ListType" style="margin-left: 1em;">
    <option style="" class="mrMultiple" [selected=""]
QuestionText is the question to be asked.
NumLines is the height of the list box. The default is 4. This parameter is omitted for drop-down lists which are always shown as a one-line box.
Ref is the internal name that UNICOM Intelligence Interviewer - Server assigns to the list. This has the form _Qqname_C, where qname is the question name.
ListType is either mrDropDown or mrListBox. If ListType is mrListBox, the multiple parameter is added to the specification to allow more than one answer to be chosen from the list.
Name is the category name defined in the metadata.
Label is the category label (response text) to display on the screen.
The selected="" attribute is present only when the question already has an answer (usually after a snapback or restart) and marks the respondent's current answer. This causes that answer to be preselected when the question is displayed.
For example, the question:
MostFrequentTea "Which type of tea do you drink most frequently?"
style(control(type = "droplist")) categorical [1..1]
Assam, Darjeeling, Ceylon, China,
EnglishBreakfast "English Breakfast",
OtherTea "Other"
<span class="mrQuestionText" style="">Which type of tea do you drink most frequently?</span>
<span style="display: inline-block;">
<select name="_QMostFrequentTea_C" class="mrDropdown" style="margin-left: 1em;">
<option style="" class="mrMultiple" value="Assam">Assam</option>
<option style="" class="mrMultiple" value="Darjeeling">Darjeeling</option>
<option style="" class="mrMultiple" value="Ceylon">Ceylon</option>
<option style="" class="mrMultiple" value="China">China</option>
<option style="" class="mrMultiple" value="EnglishBreakfast">English Breakfast</option>
<option style="" class="mrMultiple" value="OtherTea">Other</option>
See also
Default question template