Re: PEAR quickform making a select checked

From: Date: Tue, 02 Jan 2007 19:42:09 +0000
Subject: Re: PEAR quickform making a select checked
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-26245@lists.php.net to get a copy of this message
$form->setDefaults() is almost always the better choice, people always have problems with $el->setChecked(). On 1/2/07, arnaud sellenet <demental@free.fr> wrote:
Hi and a happy 'James bond' year everybody !! Wether use HTML_Advcheckbox::setChecked($bool) or HTML_QuickForm::setDefaults() (first one might be simpler in your case) Le 2 janv. 07 à 19:42, rav k a écrit : I'm trying to set my checkboxes to checked using quickform but I must be doing something wrong because it's not showing. Can you have a look to see if I'm doing it OK please: while ($row = $res->fetchRow(MDB2_FETCHMODE_ASSOC)) {
      $skills[] = &HTML_QuickForm::createElement('advcheckbox', $c,
null,'<b>'.$row['skillname'].'</b> : '.$row['description'],
      'checked' , array( -1 ,$row['skillid']));
      $c++;
} I thought if I added 'checked' it would check each advcheckbox automatically but nothings happening for some reason... I'm scratching my head but it's probably something simple... what is it? www.bitesoftware.com - software for a better lifestyle _________________________________________________________________ Windows Live™ Messenger has arrived. Click here to download it for free! http://imagine-msn.com/messenger/launch80/?locale=en-gb -- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
-- Justin Patrin

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