PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Database » DB_Table » Bug #9141

Support for hierselect

Details

Request #9141Support for hierselect
Submitted2006-10-23 17:47 UTC
Fromarne dot bippes at bippesbrandao dot de
Assignedwiesemann
StatusClosed
PackageDB_Table
PHP VersionIrrelevant
OSirrelevant
Roadmaps(Not assigned)

Comments

[2006-10-23 17:47 UTC] arne dot bippes at bippesbrandao dot de

Description:
------------
The hierselect Element has a problem if the setValue-function is used before the array with the values is loaded.
(getValue will always return only the value of the first pull-down).
Furthermore the hierselect has its own group-separator which could be filled in.

Test script:
---------------
Here is the code I'm using in Db/Table/QuickForm.php getElement():

case 'hierselect':
$element =& HTML_QuickForm::createElement(
$col['qf_type'],
$elemname,
$col['qf_label'],
$col['qf_attrs'],
$col['qf_groupsep']
);
break;

[2006-10-23 18:31 UTC] arne dot bippes at bippesbrandao dot de

I was wrong that setValue isn't working correctly. I just had to initialize it with the full path-array, sorry.
Not very comfortable that you have to get the full path to initialize the element ... but different case ;-)

So i use this one:
case 'hierselect':
$element =& HTML_QuickForm::createElement(
$col['qf_type'],
$elemname,
$col['qf_label'],
$col['qf_attrs'],
$col['qf_groupsep']
);
if (isset($setval)) {
$element->setValue($setval);
}
break;