| Mark Steudel 2005-10-26, 6:57 pm |
| Nope you are right, it's exactly the same as everything else.
I'm guessing that your value is wrong, and that you are matching the Text
versus the value. Try manually setting your select value:
$default[Area] = "myvalue";
And see if that works.
>-----Original Message-----
>From: Kilbride, James [mailto:James.Kilbride@gd-ais.com]
>Sent: Wednesday, October 26, 2005 5:31 AM
>To: pear-general@lists.php.net
>Subject: [PEAR] Quick_form Select Defaults
>
>I'm trying to set a default for the quick form select type and
>I have the following code:
>
>$activityForm->addElement('select','Area','Activity
>Area:',$areas); //$areas is my array of values and names
>$defaults['Area']=$default_val; // additional fields created
>and defaults saved into $defaults
>$activityForm->setDefaults($defaults);
>
>It sets the values of everything except my select statement.
>I've checked to make sure the $defaults['Area'] is still set and it is.
>Anybody know what I"m missing here? ican't find anything in
>the quick_form documentation that suggests select is any
>different from anything else.
>
>James Kilbride
>
|