For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > October 2005 > RE: [PEAR] Quick_form Select Defaults









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author RE: [PEAR] Quick_form Select Defaults
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
>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com