You are here: Re: Thoughts on the best way of highlighting form input errors? « PHP Programming Language « IT news, forums, messages
Re: Thoughts on the best way of highlighting form input errors?

Posted by Peter Fox on 03/03/07 08:24

Following on from Phil Latio's message. . .
>At the moment the forms are simply static html templates and the form input
>is checked using a validation class. Basically each form field is checked,
>every error is stored to an array and at the end of checking of the complete
>form, the array is output neatly at the top of the form.
After weeding anything that might be XSS :)

>
>However this is just not sexy enough for me, what I would like to happen is
>for the input boxes with errors to be highlighted with a red border (or
>something along those lines). I would also like to have the error messages
>under the box which the error occured, not altogether at the top of the
>page.
Basic principle that I use is two pronged

1
Flag the page with a big banner "Something's wrong"

2
Put in a yellow background to the input control (eg switch the css class
of the control)


There are two things that you'll need to pick up on

1
Dynamically generated pages are the way to go and are not difficult to
master.

2
You should have enough 'how to fill in this field' information already
displayed on the form so in general you don't need specific extra error
information. If there are lots of errors then that indicates poor UI
design. Sometimes there are messages that you want to display that are
more than how to type the date in properly. For these you need *more*
than a 'bzzzt wrong' indication. For example suppose you are asking for
a six digit reference number then field highlighting might be
appropriate for the wrong number of digits, a permanent 'where to find
your reference number' help message and a 'sorry we don't have anything
for that reference number pop-up or page - _with what happens next_
clearly explained.



--
PETER FOX Not the same since the bookshop idea was shelved
peterfox@eminent.demon.co.uk.not.this.bit.no.html
2 Tees Close, Witham, Essex.
Gravity beer in Essex <http://www.eminent.demon.co.uk>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация