Wap/WML : Fill in forms
Contents ]
François Houste

Multiple Choice Selection Lists

Text input fields are not the only type of input areas that you can include in a WML deck. As in HTML, WML has tags for creating multiple choice selection lists. And as is the case with HTML, defining this type of area requires the combined use of two tags: <select> to define the whole list, and <option> to define each list item:

<p>
Favourite colour:<br/>
<select name="colour" multiple="false">
<option>Red</option>
<option>Green</option>
<option>Blue</option>
</select>
</p>

Here is the result produced by this code:



Figure 3: Make your choice!

As you can see, the creation of the list also requires a few attributes to be assigned. The most important one is probably multiple, which specifies whether or not your question form accepts several answers. It can have two values:

  • multiple="true": This indicates that visitors can choose one or more answers in the proposed list.

  • multiple="false": This indicates that a visitor can select only one answer to the question.

The code produces the following display:



Figure 4: Single choice and multiple choices