Web Forms 2.0
In my opinion Web Forms 2.0 is one of the most exciting prospects for our future as web developers. Not to be confused with Web 2.0, which is just people with ideas, Web Forms 2.0 is actually something concrete and it's been submitted to the W3C.
As the web becomes increasingly interactive the Form element needs to get a whole lot more sophisticated than it already is. Currently we have to script a load of widgets and gubbins to perform basic input validation or add a date/time selector. Web Forms 2.0 would make this all a lot easier and a lot less error-prone. It suggests the inclusion of extra attributes to the humble Input element. Whereas we're used to values of "text", "hidden" and "password" we could soon be used to using others, such as "date", "email", "number" amongst others. There would also be an attribute called "required" which has the obvious effect on the field.
So, if you want a date field on your form with a date picker for the user, you just add type="date" to the field and then it's down to the browser to do the rest. The first browser to offer any support is Opera 9*. The image on the right shows Opera 9's date picker. Not that pretty, but it is a "technology preview". Still, it's promising stuff.
If you download Opera 9 you can play with other Web Forms 2.0 elements at this demo site. Those pages will also work in IE 6 because it's part of a project to implement the specification using JavaScript. The alternative is to wait for Microsoft to give in and add support to IE.
The idea is a good one: users have one common interface to the different form input types. Depending on which browser they use they will always see the same control, so there's no need for them to learn a new method of data input for each site they visit.
The idea might be good, but how well will it be implemented and how long will it take before all browsers offer basic support? I'm not holding my breath on this one but I will be following its progress keenly.
* Opera, along with Mozilla, were responsible for suggesting the specification to the W3C in the first place. Apparently Apple are interested in joining in but were too late to get their name on the draft.
Hhm. Firefox 1.5 will support xForms. So what is cooler/more useful then? Webforms 2.0 or xForms?
;-) stw
Jake, I've (andycarldavies at yahoo dot co dot uk) sent you Sitepoint's newsletter detailing xForms. I'd have liked to have posted it here, but its a touch long and full of HTML.
If there's any value in it, you could summarise in a blog maybe? Its probably on the sitepoint site somewhere, but I didn't have the time to go looking.
I don't pretend to fully appreciate what xForms offers, but, as I see it, Web Forms 2.0 is of much more immediate use to us and our users.
Andy. Didn't get anything.
I'm not all that familiar with Web Forms 2.0, but have been using xForms in relation to an XML-based project. A few of the benefits over traditional HTML forms (again, I don't know how they compare to Web Forms 2) are that they are device-independant (same form works on a handheld, smartphone, etc. as well as in a browser or desktop app) and the data you submit is XML-compliant.
The wc3 has a lot of good info about xForms:
{Link}
{Link}
{Link}
There's also an interactive tutorial:
{Link}
Seems like some of the stuff is just like programming the notes client!
Computed fields, values populated from external sources etc, etc.