QF: setting defaults for a radio group

From: Date: Thu, 27 Apr 2006 09:04:38 +0000
Subject: QF: setting defaults for a radio group
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-23859@lists.php.net to get a copy of this message
Hi, Here's what I have in my php file: $radio[] = HTML_Quickform::createElement('radio', null, null, null, 'value1'); $radio[] = HTML_Quickform::createElement('radio', null, null, null, 'value2'); $form->addGroup($radio, 'rdGroup', null); $radio[0]->setChecked(true); The last line works fine. If I had this somewhere in the file $form->addElement('text', 'txtField'); $form->setDefaults(array('txtField'=>'some text')); Then the setChecked doesn't work anymore. How can I fix this? The name of the two radio elements are both the same: 'rdGroup' so I can't use it with setDefaults. thanks in advance, damien

Attachment: [application/pkcs7-signature] smime.p7s
« previous php.pear.general (#23859) next »