For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > August 2004 > set a rule on checkbox









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author set a rule on checkbox
Mike

2004-08-30, 3:57 pm

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 !
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com