HTML_QuickForm: strangeness in setting "select" default
| From: | Claus Rasmussen | Date: | Sat, 17 May 2003 22:27:50 +0000 |
| Subject: | HTML_QuickForm: strangeness in setting "select" default | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-16420@lists.php.net to get a copy of this message | ||
Hi folks,
When I try to set the default in a "select" list, I get HTML that looks like
this:
<option value="3" 0="selected">
and not <option value="3" selected="selected"> as I would assume.
I'm building the form like this ($groups is the associative array with
group_ids as keys):
$form = new HTML_QuickForm();
$defaults["group_id"] = 3;
$form->setDefaults($defaults);
$form->addElement("select", "group_id", "Group:", $groups);
Am I doing something wrong, or missing a point somewhere?
/claus