This link has been bookmarked by 36 people . It was first bookmarked on 17 Jan 2007, by Toshiro Shimura.
-
21 Mar 11
-
15 Mar 11
-
20 Jan 11
-
29 Dec 10
-
03 Oct 09
-
05 Aug 09
-
Form validation
-
Form validation
-
Form validation
-
Form validation
-
Form validation
-
Form validation
Nowadays web developers use nifty scripts to perform form validation on the client side. Soon you'll be able to simply write the following:
<form> <p><label>Name: <input name=name required></label></p> <p><label>E-mail: <input name=email type=email required></label></p> <p><label>URL: <input name=url type=url></label></p> <p><label>Comment: <textarea name=comment required></textarea></p> <p><input type=submit value=React!></p> </form>I'd argue that it's almost as readable as English! When the user tries to submit the form the user agent checks if all conditions are being met and if that's the case it submits the form and otherwise it shows an error message to the user. Of course, you should always have server-side validation but in case the user agent supports the new forms this might just save your user a few round trips. Better for usability and your bandwidth.
What I've introduced in the above example are a few of the new controls:
emailandurl. And also a new attribute available to all form controls:required. Besides these, Web Forms 2 also includes controls for dates, time and numbers. -
input:checked+ label { ... }
-
input:readonly { ... }
-
-
04 Dec 07
-
16 Mar 07
-
14 Mar 07
-
13 Mar 07
-
26 Feb 07
-
10 Feb 07
-
27 Jan 07
-
22 Jan 07
-
19 Jan 07
-
18 Jan 07
-
17 Jan 07
-
HTML hasn't really been updated since HTML version 4 was released back in 1998. However, the WHATWG community has been working on HTML since 2004 and this will hopefully result in some much needed improvements. This article shows some of the new functionality of the proposed form chapter of HTML5: Web Forms 2. (Opera has an experimental implementation of Web Forms 2 so if you want you can try out some of the examples listed here.)
-
-
09 Jan 07
-
14 Dec 06
Douglas KarrHTML hasn't really been updated since HTML version 4 was released back in 1998. However, the WHATWG community has been working on HTML since 2004 and this will hopefully result in some much needed improvements. This article shows some of the new functiona
Page Comments
HTML hasn't really been updated since HTML version 4 was released back in 1998. However, the Web Hypertext Application Techno
Would you like to comment?
Join Diigo for a free account, or sign in if you are already a member.