Home » HTML » HTML_QuickForm » Bug #5218
hierselect with third select or more bug
Details
| Submitted | 2005-08-27 11:33 UTC |
|---|---|
| From | naonak at free dot fr |
| Assigned | avb |
| Status | Closed |
| Package | HTML_QuickForm |
| PHP Version | Irrelevant |
| OS | xp pro with Firefox |
| Roadmaps | (Not assigned) |
Comments
[2005-08-27 11:33 UTC] naonak at free dot fr
Description:
------------
With the 3.2.5 release, hierselect with third select or more keep the lastest select populate do while you not "repopulate" it. See the example.
Test script:
---------------
<?php
require_once 'HTML/QuickForm.php';
$form = new HTML_QuickForm('example');
$select1[0] = 'Pop';
$select1[1] = 'Classical';
$select1[2] = 'Funeral doom';
// second select
$select2[2][2] = 'Skepticism';
// Create a third select with prices for the cds
$select3[2][2][1] = '17.00$';
// Create the Element
$sel =& $form->addElement('hierselect', 'cds', 'Choose CD:');
// And add the selection options
$sel->setOptions(array($select1, $select2, $select3));
$form->display();
?>
[2005-08-30 10:56 UTC] naonak at free dot fr
It is not normal behavior in me mind and if that is, it is stupid behavior!
It's BUG because not in the other release!
[2005-09-05 12:42 UTC] naonak at free dot fr
"HTML standard does not allow <select> tags without at least one option."
=> If select is empty, let an option to not generate it in this case. What do you thing about this?