RE: [PEAR] HTML_QuickForm_select::setChecked() problem
| From: | Alex Housley | Date: | Tue, 02 Mar 2004 12:13:57 +0000 |
| Subject: | RE: [PEAR] HTML_QuickForm_select::setChecked() problem | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-11051@lists.php.net to get a copy of this message | ||
Just to let you all know, didn't solve this problem by using setChecked...
instead:
$form->setDefaults(array('profile' => 'new'));
Cheers
Alex
-----Original Message-----
From: Alex Housley [mailto:alexhousley@dsl.pipex.com]
Sent: 02 March 2004 11:06
To: pear-general@lists.php.net
Subject: [PEAR] HTML_QuickForm_select::setChecked() problem
Hi Guys
Any ideas why the following doesn't set this radio button to checked?
require_once 'HTML/QuickForm/radio.php';
$radio =& new HTML_QuickForm_radio('profile', null, 'Create new
profile', 'new');
$radio->setChecked(true);
$form->addElement($radio);
See the following output is wrong:
<tr>
<td style="white-space: nowrap; background-color: #F0F0F0;"
align="left" valign="top" colspan="2">
<b><input name="profile" value="new" type="radio"
id="qf_915973"
/><label for="qf_915973">Create new profile</label></b>
</td></tr><tr>
Thanks :-)
Alex
--
PEAR General Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php