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

Request #20103 Make Group::setValue() work with a group of radio elements
Submitted: 2013-10-18 19:33 UTC
From: raulmuroc Assigned: avb
Status: Closed Package: HTML_QuickForm2 (version 2.0.0)
PHP Version: 5.4.3 OS: Ubuntu 13.10 Saucy
Roadmaps: 2.0.1    
Subscription  


 [2013-10-18 19:33 UTC] raulmuroc (Raül Rodríguez)
Description: ------------ It is speciefied at the documentation: http://pear.php.net/manual/en/package.html.html-quickform2.values-datasources.php And the question is: there are plans to solve this? Is really "nonsense" (or sad) that we have such a fantastic library and every kind of element works for default values except one. Thank you.

Comments

 [2013-10-21 22:09 UTC] avb (Alexey Borzov)
-Status: Open +Status: Assigned -Assigned To: +Assigned To: cweiske
It is not specified in documentation, it is a user comment in documentation. And I'm not sure what Christian meant by it, since radios work with data sources just like any other elements do.
 [2013-10-22 11:55 UTC] cweiske (Christian Weiske)
-Status: Assigned +Status: Open
They do work with data sources, yes. But sometimes I need to modify the value during processing, and instead of being able to do something like: > $radioButtonGroup->setValue('bar'); I have to do: > $fooRadioButton->removeAttribute('checked') > $barRadioButton->setAttribute('checked') This may be ok if there are only 2 radios, but gets tedious when having 20 of them.
 [2013-10-22 13:42 UTC] avb (Alexey Borzov)
-Summary: There is currently no way to set a new value to a group of radio elements +Summary: Make Group::setValue() work with a group of radio elements -Status: Open +Status: Analyzed -Type: Documentation Problem +Type: Feature/Change Request
Fair enough, we have a special case for a group of checkboxes in HTML_QuickForm2_Container_Group::setValue(), but no special case for a group of radios. Setting this as a feature request.
 [2014-06-19 19:02 UTC] avb (Alexey Borzov)
-Status: Analyzed +Status: Closed -Assigned To: +Assigned To: avb
Implemented in Git https://github.com/pear/HTML_QuickForm2/commit/044416305f840fc3db498fca50a04918ab454802