Re: Re: HTML_QuickForm DHTML client rules and SoftRequired rule

From: Date: Mon, 27 Mar 2006 15:34:17 +0000
Subject: Re: Re: HTML_QuickForm DHTML client rules and SoftRequired rule
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-41992@lists.php.net to get a copy of this message
On 3/27/06, Mark Wiesemann <wiesemann@php.net> wrote: > "Justin Patrin" wrote: > > > I've just altered the class a bit to get rid of this requirement. I > > overrode the display() method so it calls getValidationScript() > > itself. If you don't use display() you'll still have to add the extra > > call to set up the JS event handlers. > > Although I'm not affected by this change (I'm not using display()), just > my opinion: Error messages should be shown if there is an error. Showing > the error message when the user types his name (or whatever) into a form > field, should not be the default case. > > Of course, it is easy to remove the display() function from your class > to get back the behavior from yesterday. > 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. -- Justin Patrin

« previous php.pear.dev (#41992) next »