Web Forms 2.0 - data types

This is part of a suite of test forms for Web Forms 2.0 for a set of shared examples with XForms Transitional. See the corresponding XForms Transitional example. This demo will only work on a Web Forms 2.0 compliant browser (e.g. Opera 9).

Typed fields

Here is the markup for the above form:

<form name="form1" onsubmit="false">
<fieldset>
<legend>Typed fields</legend>
<label for="f1" title="must be a number">Number</label>
<input id="f1" name="x" type="number"/>
<label for="f2" title="must be a date">Date</label>
<input id="f2" name="y" type="date"/>
</fieldset>

Comments

For this example, the same markup applies to XForms Transitional. The Opera implementation of Web Forms 2.0 doesn't allow you to type the date directly. This is likely to be a nuisance from an accessibility point of view. The rendering of the data picker is also a little off, at least on Opera 9 on Linux, with tiny buttons and crowded text.

Dave Raggett <dsr@w3.org>