HTML_QuickForm: Set field required based on the input in an other field?

From: Date: Wed, 26 Jul 2006 17:51:11 +0000
Subject: HTML_QuickForm: Set field required based on the input in an other field?
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-24780@lists.php.net to get a copy of this message
Hi There is a contact form with some options for the user to choose what kind of information he/she wishes, for example:
[      ] Name
[      ] Address
[      ] E-Mail*
Please send me: [ ] your e-mail newsletter [ ] your catalogue Now for sending the catalogue I need the name and address, so I would like to define a rule to make those required only if "your catalogue" is checked. Is this possible, maybe using the compare rule? Or do I have to hard-code this separately for both client and server sides? Thanks for a comment! Markus

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