ID: 20103
Updated by: borz_off@cs.msu.su
Reported By: raulrodriguezcabestany@gmail.com
Summary: Make Group::setValue() work with a group of radio
elements
-Status: Analyzed
+Status: Closed
Type: Feature/Change Request
Package: HTML_QuickForm2
Operating System: Ubuntu 13.10 Saucy
Package Version: 2.0.0
PHP Version: 5.4.3
-Assigned To:
+Assigned To: avb
Roadmap Versions:
New Comment:
-Status: Analyzed
+Status: Closed
-Assigned To:
+Assigned To: avb
Implemented in Git
https://github.com/pear/HTML_QuickForm2/commit/044416305f840fc3db498fca50a04918ab454802
Previous Comments:
------------------------------------------------------------------------
[2013-10-22 09:42:39] avb
-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.
------------------------------------------------------------------------
[2013-10-22 07:55:29] cweiske
-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 havingI have to do:
$fooRadioButton->removeAttribute('checked')
$barRadioButton->setAttribute('checked')
20 of them.
------------------------------------------------------------------------
[2013-10-21 18:09:51] avb
-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-18 15:33:53] raulmuroc
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.
------------------------------------------------------------------------