Bug #7148 [Opn]: Checked attribute alway true for radio button
| From: | e dot a dot schultz at gmail dot com | Date: | Fri, 17 Mar 2006 23:13:05 +0000 |
| Subject: | Bug #7148 [Opn]: Checked attribute alway true for radio button | ||
| References: | 1 | Groups: | php.pear.doc |
| Request: | Send a blank email to pear-doc+get-7685@lists.php.net to get a copy of this message | ||
Edit report at http://pear.php.net/bugs/bug.php?id=7148&edit=1
ID: 7148
User updated by: e dot a dot schultz at gmail dot com
Reported By: e dot a dot schultz at gmail dot com
Status: Open
Id: 7148
Type: Bug
Package: Documentation
Operating System: Red Hat Entiprise 4
PHP Version: 4.3.9
New Comment:
Actural HTML Generated
-------------------------
<form action="index.php" method="post" name="test"
id="test">
<div>
<table border="0" class="border">
<tr>
<td align="right" valign="top"><b></b></td>
<td valign="top" align="left"><input type="radio"
id="qf_fd3cd6"
name="tester" checked="checked" /><label
for="qf_fd3cd6">Radio button
to test</label></td>
</tr>
</table>
</div>
</form></div>
Previous Comments:
------------------------------------------------------------------------
[2006-03-17 18:09:42] e dot a dot schultz at gmail dot com
Description:
------------
When created through a HTML_QuickForm object a radio Element's checked
attribute will always remain true. This is the case even after the
setChecked(false) method has been called.
Test script:
---------------
$form = new HTML_QuickForm( "test", "post", "index.php");
$radio = $form->createElement("radio");
$radio->setName("tester");
$radio->setText("Radio button to test");
$radio->setChecked(false);
$form->addElement($radio);
$form->display();
Expected result:
----------------
The radio button 'tester' should not be selected by default and the
HTML tag should not have a checked="checked" attribute.
Actual result:
--------------
The radio button 'tester' is selected by default and the HTML tag has a
checked="checked" attribute.
------------------------------------------------------------------------
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=7148&edit=1