Re: HTML_QuickForm: strangeness in setting "select" default

From: Date: Sat, 17 May 2003 23:25:33 +0000
Subject: Re: HTML_QuickForm: strangeness in setting "select" default
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-16421@lists.php.net to get a copy of this message
<claus@webclaus.com> wrote : > 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? Hi Claus, Just do a: pear upgrade HTML_QuickForm This is fixed in beta2. Bertrand Mansion Mamasam

« previous php.pear.dev (#16421) next »