QuickForm dependant validation

From: Date: Thu, 08 Dec 2005 19:10:37 +0000
Subject: QuickForm dependant validation
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-22183@lists.php.net to get a copy of this message
I was hoping I could get a little help on doing validation that is dependant upon another element. Like a credit card form with a checkbox that says "address same as billing". If it is checked then I want it to enable all the rules lower down. // theory code if this element is checked $ccForm->addElement('checkbox', 'sameasbilling', 'Same as billing', null ); then process the rest of these rules $ccForm->addElement('text', 'saddress1', 'Address 1:', array( 'id' => 'sccaddress1', 'size' => '20')); $ccForm->addRule('saddress1', 'Add is required', 'required, null, client ); TIA, Mark

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