Yesterday Web Forms 2 has been published as a submission on
w3.org: Web Forms 2.0 — W3C Member Submission 11 April 2005. The W3C also published comments on the submission. You can also read about this on the site of WHATWG in the fourth call for comments.
Web Forms 2 is an extension to HTML and XHTML 1. It introduces various new values for the
TYPE attribute on the
INPUT element. You can now use
REQUIRED attribute you can tell the user agent to not submit the form until all form controls with a
REQUIRED attribute set are satisfied, et cetera. There are lots of new options and all are designed to be backwards compatible with even text browsers.
The cooperation with the W3C will most likely not slow the process down. It is expected that this is the last call for comments and that there will be very few if not none comments on the draft. After that a call for implementations draft will be published and user agents can start implementing the new features. For Mozilla one person is doing some work on the moment on a separate branch. I’m not sure when it will land, but I guess it will take some time. I think Opera is working on it as well and Apple might be doing something too. (Note that Apple didn’t submit it to the W3C along with Mozilla and Opera because the decision had to be made quickly on some conference. You can read about it if you desire.
Looks very interesting. This would really make it a lot easier to create interactive web pages with far less scripting.
This is very good news, I'm very pleased that the W3C is finally involved, though I would have preferred they were involved much sooner. I guess this means I'd better hurry up and work out whether or not my few remaining issues are still worth taking up or not, and speak now or forever hold my peace. :-)
If the W3C was involved sooner, it probably would not have worked out. Actually, the W3C rejected the work when Ian Hickson tried to do it via the W3C.
Look nice. But some changes seem unnecessary, e.g. why one will want to put
form element inside the
input[type="datetime"] is cool, but what about localized datetime? Have to be English only? :-/
User input is validated against the type of form control by the user agent... Using a REQUIRED attribute you can tell the user agent to not submit the form until all form controls with a REQUIRED attribute set are satisfied, et cetera.
There are lots of new options and all are designed to be backwards compatible with even text browsers.
So how does that one work then? If it's backwards compatible, it means that you can't guarantee that the client will have already checked and validated the form. Does that not mean we would still be stuck with the same old server-side checks?
minghong, there is also
datetime-local. However, note that Web Forms 2 defines controls, not the user interface.
What about being compatible with IE 5/6? Can it fall back to a usual text
It appears the extension only adds new features. So yes, it should also work in IE5/6.
The default value for unrecognized or invalid
TYPE attribute (when applied to
INPUT) values is
type="url" will always fall back to
type="text" in browsers that do not support Web Forms 2.
The cooperation with the W3C will most likely not slow the process down.
Which means this will actually be finalized sometime in 2008. Add a year for Opera and Mozilla support, and Microsoft might get to it sometime after my unborn babies have babies. And then by the time everyone upgrades those browsers I'll be dead and rotting!
I just wish these things didn't move like glaciers. This is the internet! It's supposed to birth a world of instant gratification! :)
type="date", the user agent is supposed to take the ISO8601-formatted date in the
value attribute and convert it into a localized form. It would then convert it back to ISO8601 just before submitting the form.
Anne: With regard to the
type attribute, the default type for unknown
type values should be text, but that does not mean that it must be text, so in theory there may be a situation where the user agent could do something else and still be compliant with HTML 4.01. (I can't think of an actual case where this would happen, though.)
Foofy: My impression was that WHATWG wants WF2 implementations by the end of this year. My guess is that mid-2006 would be the latest you'd see an implementation on Opera or Mozilla. WHATWG is just giving the W3C a chance to add their own input to the spec before the start of the implementation phase.
Does that not mean we would still be stuck with the same old server-side checks?
Matthew, as far as I know HTML4 does not say should or must for that, to quote:
This attribute specifies the type of control to create. The default value for this attribute is
That's for types that are undefined, not unknown. So if you don't include a
type attribute, it's text. However, the spec says that if an attribute value is unknown or invalid, the user agent should, rather than must, use the default value.