Home » HTML » HTML_Template_Flexy » Bug #7867
Select multiple with multiples options selected
Details
| Request #7867 | Select multiple with multiples options selected |
|---|---|
| Submitted | 2006-06-11 22:59 UTC |
| From | paolodoors at yahoo dot com dot ar |
| Status | Bogus |
| Package | HTML_Template_Flexy |
| PHP Version | 5.1.2 |
| OS | GNU/Linux - Ubunto Dapper |
| Roadmaps | (Not assigned) |
Comments
[2006-06-11 22:59 UTC] paolodoors at yahoo dot com dot ar
Description:
------------
When i have a multiple select and i try to select many options, only the last option is selected.
Test script:
---------------
flexy.php
<?php
include('HTML/Template/Flexy.php');
include('HTML/Template/Flexy/Element.php');
$options['templateDir'] = '.';
$options['complieDir'] = '/tmp';
$form = new HTML_Template_Flexy($options);
$form->compile('flexy.thtml');
$elements['test_select'] = new HTML_Template_Flexy_Element('select', array('multiple' => 'multiple'));
$elements['test_select']->setOptions( array(
'123' => 'a select option',
'1234' => 'another select option'
));
$elements['test_select']->setValue('123');
$elements['test_select']->setValue('1234');
$form->outputObject(new StdClass, $elements);
?>
flexy.thtml
<html>
<body>
<form name="theform" flexy:ignoreonly="yes">
<select name="test_select"></select>
</form>
</body>
</html>
Expected result:
----------------
<html>
<body>
<form name="theform">
<select name="test_select" multiple="multiple">
<option value="123" selected>
a select option
</option>
<option value="1234" selected>
another select option
</option>
</select>
</form>
</body>
</html>
Actual result:
--------------
<html>
<body>
<form name="theform">
<select name="test_select" multiple="multiple">
<option value="123">
a select option
</option>
<option value="1234" selected>
another select option
</option>
</select>
</form>
</body>
</html>