Re: Re: HTML_QuickForm DHTML client rules and SoftRequired rule
| From: | Justin Patrin | Date: | Mon, 27 Mar 2006 15:52:09 +0000 |
| Subject: | Re: Re: HTML_QuickForm DHTML client rules and SoftRequired rule | ||
| References: | 1 2 3 4 5 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-41994@lists.php.net to get a copy of this message | ||
On 3/27/06, Mark Wiesemann <wiesemann@php.net> wrote:
> Justin Patrin wrote:
>
> > Well, that's just one of the things it does. It also adds onBlur and
> > onChange handlers so that when an element loses focus (text element)
> > or its value is changed (select element) it will run validation. IMHO
> > that's very helpful for users, especially for long forms, as it lets
> > the user know right away that they need to fix something instead of
> > waiting for the very end of the form.
>
> Thanks for the clarification.
>
> I did some more tests on your example page: Starting typing in the email
> field results in a error message because the address is not valid while
> typing. Jumping via tabular key into the next field results in another
> error in the second field ("required"). Same for the "soft required"
> field -- jumping via tabular key gives me the question whether I'm sure
> to not fill something in there. And -- surprise! *g* -- the same in the
> select field.
>
> In all these cases showing the error message is too early and especially
> in the "soft required" case some kind of bogus.
>
Please don't make general statements like this. These are all things
that you may or may not want. *You* may not like it, but I think it's
pretty cool and the user who asked for this wanted this. As I said,
this can help long forms quite a bit by giving the user feedback
before they go click submit. In fact, if the top of a form was off the
screen, clicking submit with this new JS could cause them to not even
see the errors.
You can just comment out the code which adds the event handlers to the
elements if you don't like them or simply remove the overridden
display() function. This is all just an example of what *can* be done.
--
Justin Patrin