Re: Submit/Validate triggering problem.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux