help with quickform, I want to pass more than one parameter to a function rule!

From: Date: Fri, 25 Nov 2005 12:56:26 +0000
Subject: help with quickform, I want to pass more than one parameter to a function rule!
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-22077@lists.php.net to get a copy of this message
|Hi all, I'm trying to make a form generator using HTML_Quickform, and I have a problem when registering rules for the form fields, I want to make a type check(can be multiple types) so I register a function in the form: $this->registerRule('checkType', 'function', 'typeOK', &$this); Well so when I add a field I need to call to my function typeOk with two parameters: the content of the field and the type that is suppose to be, so with a call like this: $this->addRule('field1', 'Tipo no concuerda', 'checkType'); I cannot pass my type variable to my function, is there anyway of do it?,I mean pass more variables than the content of the field to my function? The function should be something like this:
       function typeOk($sField, $sType)
       {
           //type check depending of $sType
           
           return $bOk;
       }
Thanks in advance |

« previous php.pear.general (#22077) next »