| Stowe, Nola 2005-05-26, 8:59 pm |
| Sorry for the double post, my bad, learning to use the newsgroup software.
I used the advcheckbox and that worked fine. Don't know what the problem was
with checkbox.
Could you give me an example of using the setChecked method please?
Thanks Justin!
-----Original Message-----
From: Justin Patrin [mailto:papercrane@gmail.com]
Sent: Thursday, May 19, 2005 11:05 PM
To: Nola
Cc: pear-general@lists.php.net
Subject: Re: [PEAR] QuickForm: setting checkbox when editing
On 5/18/05, Nola <nola@devasap.com> wrote:
> I tried to search before sending this, so I'm sorry if I could not
> find where this has been said before.
>
> I am using the form to edit, so I use the form->setDefaults($array) to
> set the form fields with the data to edit, but I don't know how to set
> the checkboxes.
>
> Do I need to check the value of my variable and if == 1, then set the
> attribute "checked" for the checkbox?
>
setDefaults should work fine. If it doesn't, try using setChecked on the
checkbox.
--
Justin Patrin
<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
The information in this email and any attachments may contain
confidential information that is intended solely for the
attention and use of the named addressee(s). This message or
any part thereof must not be disclosed, copied, distributed or
retained by any person without authorization from the addressee.
If you are not the intended addressee, please notify the sender
immediately, and delete this message.
<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
|