Re: Quickforms: Checkbox not checked using setChecked (?)
| From: | Alexey Borzov | Date: | Fri, 07 Mar 2003 13:40:04 +0000 |
| Subject: | Re: Quickforms: Checkbox not checked using setChecked (?) | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-4086@lists.php.net to get a copy of this message | ||
7 Март 2003 16:35, Jeroen Houben написал:
> >This should be
> >$checkbox =
> >&$form->addElement('checkbox','is_allowed','Some check',
> > null);
>
> Thanks, that works! shouldn't the method "addElement" automatically
> return a reference though?
Citing http://www.php.net/manual/en/language.references.return.php
:
Note: Unlike parameter passing, here you have to use & in both places - to
indicate that you return by-reference, not a copy as usual, and to indicate
that reference binding, rather than usual assignment, should be done for
$foo.