Re: HTML_QuickForm_checkbox
| From: | Philippe Jausions | Date: | Thu, 09 Jun 2005 17:06:05 +0000 |
| Subject: | Re: HTML_QuickForm_checkbox | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-38055@lists.php.net to get a copy of this message | ||
wrote:
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");I'm not a specialist of QuickForm, but you may want to try to index your checkbox after the values. May not be applicable in your context though. $formChecks[] = &HTML_QuickForm::createElement('checkbox', 'perm[' . $row['idModule'] . ']', null, $row['name']); -Philippe