set a rule on checkbox

From: Date: Mon, 30 Aug 2004 13:13:33 +0000
Subject: set a rule on checkbox
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-14334@lists.php.net to get a copy of this message
Hi, I would like that the user is obliged to tick one of the checkbox. Here's the code for adding checkbox : while ($do->fetch()) { $form->addElement('checkbox', 'addmultiple[' . $do->profcode. ']', ' ' ,$do->proflibel, array('checked' => 'checked')); } I thought that it was enough to add a rule like this : $form->addRule('addmultiple','profil obligatoire', 'required', null, 'client'); but that does not work !

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