logo

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.

Comments

  1. Hhm. Firefox 1.5 will support xForms. So what is cooler/more useful then? Webforms 2.0 or xForms?

    ;-) stw

  2. 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.

    • avatar
    • Jake Howlett
    • Tue 1 Nov 2005 10:37 AM

    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.

  3. 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}

    • avatar
    • IanB
    • Tue 1 Nov 2005 02:35 PM

    Seems like some of the stuff is just like programming the notes client!

    Computed fields, values populated from external sources etc, etc.

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment:


About This Page

Written by Jake Howlett on Tue 1 Nov 2005

Share This Page

# ( ) '

Comments

The most recent comments added:

Skip to the comments or add your own.

You can subscribe to an individual RSS feed of comments on this entry.

Let's Get Social


About This Website

CodeStore is all about web development. Concentrating on Lotus Domino, ASP.NET, Flex, SharePoint and all things internet.

Your host is Jake Howlett who runs his own web development company called Rockall Design and is always on the lookout for new and interesting work to do.

You can find me on Twitter and on Linked In.

Read more about this site »

Elsewhere

Here are the external links posted on the same day.

More links are available in the archive »

More Content