Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 3.2.16

Bug #3653 setValue not working
Submitted: 2005-03-01 03:37 UTC
From: dcrookston at gmail dot com Assigned:
Status: Bogus Package: html_quickform
PHP Version: 4.3.10 OS: Linux-something
Roadmaps: (Not assigned)    
Subscription  


 [2005-03-01 03:37 UTC] dcrookston at gmail dot com
Description: ------------ When I execute the code in the "reproduce code" part, the value for $box is still set to 1, not to whatever $checked_value is. Reproduce code: --------------- $box = $form->createElement('checkbox', $name, $display); $box->setValue($checked_value); $form->addElement($box); Expected result: ---------------- What I expect is that the value="" part of the checkbox will be set to something meaningful, i.e. the value of $checked_value. Actual result: -------------- The value="" part stays set to "1"

Comments

 [2005-03-01 22:12 UTC] bmansion at mamasam dot com
This is the expected behavior. A checkbox value in QF is always 1 when checked. If you need a different value (something I personally doubt), have a look at the advcheckbox element.