Restricted Input with <select>

Restricting input from a user means presenting the user with a finite number of choices. In WML, this means using the <select> tag to present the choices as a list of text items from which the user can select one or more. This section will detail the use of the <select> tag and its primary children—the <option> and <optgroup> tags.

To get started, let's look at the simplest use of the selection list. Listing 7.16 shows a deck with one card that creates a simple poll.

Listing 7.16 Voting for One of a Limited Number of Choices
 <?xml version="1.0"?> <!-- listing0716.wml --> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN" "http://www.wapforum.org/DTD/wml12.dtd"> <wml> <!-- using a simple selection list ...

Get WAP Development with WML and WMLScript now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.