Quickform - set check group radio

From: Date: Thu, 07 Dec 2006 07:20:14 +0000
Subject: Quickform - set check group radio
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-25998@lists.php.net to get a copy of this message
Hi, I have a form with a text box 2 radio button (in a group); i'd like to set default value for one radio, but it doesn't go. This is my code: $radio['off'] =& HTML_QuickForm::createElement('radio', 'forward_enable', '1','Disabilitato','off'); $radio['on'] =& HTML_QuickForm::createElement('radio', 'forward_enable', '2','Abilitato','on'); $radio['on']->setChecked(true); $form->addGroup($radio, 'forward_enable', 'Forward ', '-', false); If display object (by $radio['on']->display) it is check but if I display form (by $form->display), my radio isn't check I use php PHP 5.1.6 and QuickForm 1.162 Regards, Francesco

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