|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-04-28 03:50 UTC] mansion@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 19 12:00:02 2025 UTC |
When I used the setDefaults() method in QuickForm to set the selected option in a selectbox I get this HTML code: <option [...] 0="selected"> and the options doesn't get selected. The following code in toHTML (in select.php) seems wrong: foreach ($this->_options as $option) { if (is_array($this->_values) && in_array($option['attr']['value'], $this->_values)) { $this->_updateAttrArray($option['attr'], array('selected')); } should be: foreach ($this->_options as $option) { if (is_array($this->_values) && in_array($option['attr']['value'], $this->_values)) { $this->_updateAttrArray($option['attr'], array('selected' => 'selected')); }