E-mail List Archives
Re: Form validation
From: Patrick H. Lauke
Date: Feb 9, 2006 6:30PM
- Next message: Alex Tallon: "Re: PDF compliancy question"
- Previous message: Alex Tallon: "PDF compliancy question"
- Next message in Thread: ben morrison: "Re: Form validation"
- Previous message in Thread: ben morrison: "Form validation"
- View all messages in this Thread
ben morrison wrote:
> I've just finished improving our javascript form validation and would
> be grateful for opinions.
Instead of the "* indicates a required field", could you not just have
something like "Name (required)" as label (could even be wrapped in a
span and styled a little bit smaller than the main label text, a la
<label for="name">Name <span class="req">(required)</span></label>) ?
> 3. A list of errors which link to each form element is written in
> (uses focus insted of anchors)
So, if this is also generated server-side if javascript is disabled, you
should also make the links work to a certain extent. Currently, w/out
javascript, hitting the link does not focus the relevant input, as
expected, but then hitting TAB jumps to the *following* input. To work
around this, you may have to give an id to the label or parent div, so
the focus/caret is placed before the input and a subsequent TAB should
go to it. Obviously, this would also need a subtle change to the focusMe
function.
> 4. Each area is flagged up with a coloured background.
Could you also changed the label text? If you take my previous
suggestion into account, you could end up with a label like "Error: Name
(required)" or similar.
> The only thing I have left out is a alert box - is this needed?
Not sure if it's needed, but it shouldn't hurt either.
P
--
Patrick H. Lauke
___________
re
- Next message: Alex Tallon: "Re: PDF compliancy question"
- Previous message: Alex Tallon: "PDF compliancy question"
- Next message in Thread: ben morrison: "Re: Form validation"
- Previous message in Thread: ben morrison: "Form validation"
- View all messages in this Thread