HTML_QuickForm_checkbox
| From: | webmauá) | Date: | Thu, 09 Jun 2005 14:36:30 +0000 |
| Subject: | HTML_QuickForm_checkbox | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-38054@lists.php.net to get a copy of this message | ||
Hi,
In one of my pages I'm using this code:
$res =& $db->query(" select idModule, name from module where status='1' order
by name ");
while($res->fetchInto($row)) {
$formChecks[] = &HTML_QuickForm::createElement('checkbox', 'perm[]', null,
$row['name'], array('value'=>$row['idModule']));
}
$form->addGroup($formChecks, null, null, "<br>\n");
but all the checkboxes are comming with the value equal 1
checking the constructor of HTML_QuickForm_checkbox I see the code below:
$this->updateAttributes(array('value'=>1));
I think it fixes the problem and permiss the modification of the value attribute and all others:
$this->updateAttributes($attributes);
It´s an error or I'm bad using the class ??
Thanks for your time ;) and sorry for my poor english ;P
Alan Domladovac Silva
Web Developer - Centro Universitário Barão de Mauá - Ribeirão Preto - São Paulo - Brasil