[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pear-doc
Subject:    [PEAR-DOC] [PEAR-BUG] Bug #7148 [Opn]: Checked attribute alway true for radio button
From:       "e dot a dot schultz at gmail dot com" <pear-doc () lists ! php ! net>
Date:       2006-03-17 23:13:05
Message-ID: 20060317231305.58658.qmail () pb12 ! pair ! com
[Download RAW message or body]

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

-- 
PEAR Documentation List Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic