Re: quickform : setChecked doesn't work

From: Date: Tue, 17 Feb 2009 19:28:04 +0000
Subject: Re: quickform : setChecked doesn't work
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-29697@lists.php.net to get a copy of this message
pear-2 wrote: > > That works, thank you > It didn't for me, using QuickForm_Controller and QuickForm_Page..but I found the ultimate fix: set the wanted value of the radio group directly in the form's $_submitValues array, here we go: " $form->_submitValues['grp_name'] = 'val1'; // or val2 if you want the other one being checked $radios[] = &HTML_QuickForm::createElement('radio', null, null, 'label1', 'val1', array('class' => 'radio')); $radios[] = &HTML_QuickForm::createElement('radio', null, null, 'label2', 'val2', array('class' => 'radio')); $form->addGroup($radios, 'grp_name', 'Label'); " -- View this message in context: http://www.nabble.com/quickform-%3A-setChecked-doesn%27t-work-tp8055856p22064429.html Sent from the Pear - General mailing list archive at Nabble.com.

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