Re: HTML_QuickForm | trouble with checkboxes
| From: | Bertrand Mansion | Date: | Mon, 08 Dec 2003 23:00:01 +0000 |
| Subject: | Re: HTML_QuickForm | trouble with checkboxes | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-9387@lists.php.net to get a copy of this message | ||
<jam@zoidtechnologies.com> wrote :
> greetings,
>
> I'm using HTML_QuickForm v3.2, and I'm attempting to set the 'checked'
> attribute on a form with some code like this:
>
> $checkboxes = array();
> $c = &HTML_QuickForm::createElement("checkbox", "explicitlyrics",
> null,
> "explicit lyrics");
> $c->setChecked(false);
> $checkboxes[] = $c;
>
> however, when the form is displayed, it is 'checked', despite my call to
> setChecked on the object.
>
> perhaps I am doing something silly.. but I couldn't find an example doing
> things this way in the 'docs' directory of the tarball.
Did you try:
$checkboxes[] =& $c;
Bertrand Mansion
Mamasam