Re: Submit/Validate triggering problem.

From: Date: Sun, 23 Oct 2005 03:36:36 +0000
Subject: Re: Submit/Validate triggering problem.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-224499@lists.php.net to get a copy of this message
On Fri, October 21, 2005 10:51 am, Uros Dukanac wrote: > I can make "workaround" by checking the value of $Filter (is it "A" or > "B") to > determine which button sent a request (see "Workaround code" after > "Original > code"), but it looks "dirty" to me, and I'm wondering why to do that It's pretty standard to check which button was pressed by what values are sent from the browser. That's just how it's done. > if ($AForm->validate() && Filter == "A") I got no clue what all the QuickForm and validate() stuff is doing, but you may not really care about validate() here unless $Filter == 'B'... So I'd maybe switch the order of the tests and put $Filter first. Or maybe you always want validate() for A to run, even when they don't click on A? -- Like Music? http://l-i-e.com/artists.htm

« previous php.general (#224499) next »