KBD

Keith Devens .com

Sunday, March 21, 2010 Flag waving
Of all tyrannies a tyranny sincerely exercised for the good of its victims may be the most oppressive. It may... – C.S. Lewis
← yet another test postStop Acrobat Reader from creating "My eBooks" folders →

Daily link icon Saturday, April 17, 2004

Best practices for web form errors

Simplified Form Errors

Anything else anyone can recommend? I reworked my form library a bit, which I plan to release as open source. One of the things it can do is generate a default form given a form definition. Most of the time, that form is completely adequate and you don't need to do anything else. The form I'm typing in right now is completely auto-generated.

Anyway, I just want to make sure I make the generated forms as good as possible, so if anyone has anything else they'd like to point me to, please do.

Update: A little more here

Also, what about security? You can prevent automated posting to some degree by, for example, marking the form with the timestamp it was sent as well as an associated hash of that timestamp. When both are sent to the server they're validated against each other. It doesn't completely prevent automated posting, but it would at least require some HTML scraping to circumvent. What else?

Update: It seems to me that there are a few kinds of errors you have to report. You have the field-specific errors, such as "E-mail address is required", and "E-mail address was not in a valid format", and then inter-field errors, such as "Both password fields didn't match". Then you have whole-form errors that summarize the state of the entire form, such as "There was an error posting your entry".

← yet another test postStop Acrobat Reader from creating "My eBooks" folders →

Comments XML gif


Feel free to post a comment below. Please see my comment policy.

Formatting Rules (No HTML):

  • **bold**, *italic*, _underlined_, --strikeout--
  • "text"="url" creates a link, and URLs are auto-highlighted
  • Blockquote: Like e-mail, begin paragraph with > (greater-than sign)
  • Lists: begin paragraph with *,-, or + (unordered), or # (ordered)
  • Code block: ?!code:language=perl|php|sql|javascript|etc.{\n}...{\n}?!/code

:
(will be your IP address if blank)
: (optional)
(Will not be shown on site)

: (optional)
:

March 2010
SunMonTueWedThuFriSat
 123456
78910111213
14151617181920
21222324252627
28293031 



RSS feed RSS feed for Keith's Weblog
Atom feed Atom feed for Keith's Weblog
Weblog archive
Recent comments
  on 3 posts

Recent comments XML

new⇒Spider solitaire

I to am somewhat addicted to​spending too much time on SS.  I​have been stu...

stupid_horse: Mar 20, 10:34pm

I hate ASP.NET

I hate ASP... I was doing wonders​with PHP, then suddenly one of my​clients...

Johnies: Mar 17, 6:14am

Quantum physics and free will

I knew you were going to say that....

Tom Massey: Mar 15, 9:26pm

Generated in about 0.122s.

(Used 8 db queries)