I am trying to get a default value set for a "Select" element, like this:
$f = new HTML_QuickForm( "request", "post", "", "_self", NULL,TRUE);
$f_priority = array ("Very low","Low","Nor mal","High","Ve ry High");
$priority_eleme nt =& $f->addElement("se lect", "request_priori ty",
"Priority:" , $f_priority);
$priority_eleme nt->setSelected("2 ");
....
But the html which is generated from this looks like this:
....
<option value="1">Low</option>
<option value="2" selected="selec ted">Normal</option>
<option value="3">High</option
....
To my understanding, it should only say "selected", not "selected="sele cted"
Is there some workaround, am I doing something wrong, or does one need
to hack QuickForm for this?
/Marcin
$f = new HTML_QuickForm( "request", "post", "", "_self", NULL,TRUE);
$f_priority = array ("Very low","Low","Nor mal","High","Ve ry High");
$priority_eleme nt =& $f->addElement("se lect", "request_priori ty",
"Priority:" , $f_priority);
$priority_eleme nt->setSelected("2 ");
....
But the html which is generated from this looks like this:
....
<option value="1">Low</option>
<option value="2" selected="selec ted">Normal</option>
<option value="3">High</option
....
To my understanding, it should only say "selected", not "selected="sele cted"
Is there some workaround, am I doing something wrong, or does one need
to hack QuickForm for this?
/Marcin
Comment