Free-form Input with <input>

Like an edit box on an HTML form, a WML deck allows you to gather free form data from the user. By now, you are very aware that the intent of WAP applications is to run on very limited capability devices. These devices frequently have very poor user input facilities; some have overloaded numeric keypads, while some use handwriting recognition.

The most direct method for collecting data from the user is the <input> tag. The browser renders this element as similar to an HTML edit box as it can. Listing 7.8 shows the element used in its simplest form.

Listing 7.8 Gathering a Simple String in the Browser
 <?xml version="1.0"?> <!-- listing0708.wml --> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN" "http://www.wapforum.org/DTD/wml12.dtd"> ...

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

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.