KBD

Keith Devens .com

Sunday, October 12, 2008 Flag waving
Crying is all right in its way while it lasts. But you have to stop sooner or later, and then... – C.S. Lewis (The Silver Chair, ch 2)
← 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)
:

October 2008
SunMonTueWedThuFriSat
 1234
567891011
12131415161718
19202122232425
262728293031 



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

Recent comments XML

new⇒URL design

http://groups.google.com/group/cool​ndex/web/asian-girl-sucking-to-blac​k-man...

derek: Oct 12, 12:13pm

I hate PHP

Elliot Anderson,

Dude!! You the​man! The reverse replacement for​array_u...

Alex Ndungu: Oct 11, 1:35am

Call a function from a string in Python

?!code:
some_object.__getattribute​__('method_name')()
?!/code

is​the s...

Patrick Corcoran: Oct 8, 3:53pm

Spider solitaire

I have won 185 games of Spider​Solitaire at the "Difficult" level.​ What is...

75.179.28.113: Oct 8, 12:42pm

Sed one-liners

Hi.

I wanted to let you know​that I wrote an article "Famous Sed​One-Lin...

Peteris Krumins: Oct 8, 3:05am

Timesheet Calculator

Hadn't seen it before now, but my​company already uses a time​tracking prog...

Keith: Oct 7, 10:44am

Girls, please don't get breast implants

Hey everyone, 

I am new to this​blog and I have enjoyed reading all​your...

Sarah.M.: Oct 6, 9:45am

Generated in about 0.249s.

(Used 8 db queries)

mobile phone