[whatwg] [Web Forms 2.0] Last minute suggestion - The <format> element.

Matthew Raymond wrote:
>    I think we should introduce to WF2 a new element called <format> that 
> would contain the formatting hint text. This element would be rendered 
> in legacy user agents as text, but in WF2 user agents, its contents 
> would be used in a far more intelligent manner. Take this example, for 
> instance:
> 
> | <label>Start Date <format>(MM/DD/YYYY)</format>:
> | <input type="date" id="startdate"/></label>

I dont think you can use the same string as human readable hint and as 
machine processable format. For example, the hint will need to be 
localized for different languages. So the actual format string should 
probably be an attribute.


>    Some webmasters, however, may want everyone to enter the date in the 
> exact same format, for the sake of consistency (which would be useful to 
> simplify employee training, for instance). This can be accomplished by 
> assigning the value "entry" to the |applyon| attribute:

This defeats the idea that the datetime control should be localized and 
feel native. Many platform datetime selectors allows the use to select 
the date from a calendar and displays it formatted something like 
"Saturday, January 22, 2005" in the users language. By constraining the 
date control to follow a simple format string, a lot of UI power is 
lost. (Btw. the point of hiding the hint for WF2 compliant browsers is 
lost if WF2 users should enter data in the exact same format.)

But I think its a good idea to be able to specify the exact submission 
format, since this will make adoption and backwards compatibility easier.

regards
Olav Junker Kj?r

Received on Saturday, 22 January 2005 17:07:49 UTC