Re: Re: HTML_QuickForm DHTML client rules and SoftRequired rule
| From: | Justin Patrin | Date: | Mon, 27 Mar 2006 18:18:35 +0000 |
| Subject: | Re: Re: HTML_QuickForm DHTML client rules and SoftRequired rule | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-41996@lists.php.net to get a copy of this message | ||
On 3/27/06, Mark Wiesemann <wiesemann@php.net> wrote:
> Justin Patrin wrote:
>
> > Please don't make general statements like this. These are all things
> > that you may or may not want. *You* may not like it, ...
>
> Sorry, my mail wasn't meant to offend you. Actually my last sentence
> contained the phrase "in my opinion", I must have deleted it while
> correcting the sentence.
>
Sorry, I'll moderate my reading.
> > but I think it's pretty cool ...
>
> It is cool. ;-) But it also has some problems, as described. When I
> don't have done anything with this "soft required" field, then the
> question is really bogus.
But you did. You gave the element focus (tabbing to it or clicking on
it), then took the focus away (tabbing out of it or clicking
elsewhere). This constitues interacting with the element. Since you've
interacted with the element but not done anything, it lets you know
that there is a potential problem.
Again, this is more of a question of opinion. When would you like the
error checking to happen? If not onBlur or onKeyUp, the only
possibility left is onSubmit (unless you want to do it onMouseOver or
onMouseOut, which I doubt). If you leave validation to onSubmit then
you can have the other problems I've outlined. IMHO it's better to at
least have the onBlur as it lets the user know, right after they've
filled out the form, that they need to fix something.
>
> > 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.
>
> True, I will have to consider this for the usage in my projects.
>
> > 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.
>
> Right, that's what I also wrote. And that's the behavior of the old code.
>
> I just wanted to point out that you had a nice idea and made a nice
> implementation. But it also has -- in my opinion -- some problems.
> (And in your original post you asked for comments.)
>
Thanks for the discussion. :-)
--
Justin Patrin