Bug #17485 [Opn->Dup]: Cannot set value submitted by checkbox

From: Date: Sat, 12 Jun 2010 20:30:17 +0000
Subject: Bug #17485 [Opn->Dup]: Cannot set value submitted by checkbox
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-3927@lists.php.net to get a copy of this message
Edit report at http://pear.php.net/bugs/bug.php?id=17485&edit=1 ID: 17485 Updated by: borz_off@cs.msu.su Reported By: herringm at denison dot edu Summary: Cannot set value submitted by checkbox -Status: Open +Status: Duplicate Type: Bug Package: HTML_QuickForm Operating System: RHEL4 Package Version: 3.2.11 PHP Version: 5.2.9 Roadmap Versions: New Comment: -Status: Open +Status: Duplicate Duplicate of request #4564 This was already changed in QuickForm2, won't be changed in QuickForm Previous Comments: ------------------------------------------------------------------------ [2010-06-11 21:12:41] herringm Description: ------------ When passing HTML arguments to createElement() "value" is overwritten by the number 1. Attempting to call setValue on the checkbox fails to apply the passed in user parameter. Note: other HTML attributes are correctly applied. Test script: --------------- $person[] =& $form->createElement('text', 'full_name', 'Full Name:', array('size' => 40)); $person[] =& $form->createElement('checkbox', 'element_name', null, null, array('value' => 'Yes', 'title)); $form->addGroup($person, 'person', 'Name:', ' Over 18?'); Expected result: ---------------- <input value="Yes" title="My Tooltip" name="element_name" type="checkbox" id="qf_1662eb" /> Actual result: -------------- <input value="1" title="My Tooltip" name="element_name" type="checkbox" id="qf_1662eb" /> ------------------------------------------------------------------------ -- Edit this bug report at http://pear.php.net/bugs/bug.php?id=17485&edit=1

« previous php.pear.bugs (#3927) next »