RE: [PEAR] QuickForm: setting checkbox when editing

From: Date: Fri, 20 May 2005 16:46:53 +0000
Subject: RE: [PEAR] QuickForm: setting checkbox when editing
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-19315@lists.php.net to get a copy of this message
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. <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>

« previous php.pear.general (#19315) next »