Re: Another QuickForm question

From: Date: Fri, 14 Mar 2003 03:41:37 +0000
Subject: Re: Another QuickForm question
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-4227@lists.php.net to get a copy of this message
Ah. I figured it out. What I was doing AFTER this was causing the problem. I want the selection menu to start with a generic message like: Choose Option so after I did the query and got the values into my array I was doing this: $tmparray = array(0=>'Select From Results'); $qper = array_merge($tmparray, $qper); Anyhow, I just realized this is really bad to do to an associative array. Can anyone suggest a method to make my select menu have a default option of Choose or something? Can I do this in QuickForm? Thanks for any help. Charles On Thursday, March 13, 2003, at 08:23 PM, Brad Hubbard wrote:
On Fri, 14 Mar 2003 10:55 Australia/Melbourne, Charles Kline did align ASCII characters thusly: Hi again Charles,
When creating a select menu, I am using this syntax: $form_get_p->addElement('select', 'person', 'Edit Person:', $qper);
What do you see if you do a print_r( $qper ) here?
$select = &$form_get_p->getElement('person'); $select->setSize(1); $select->setMultiple(false);
At a quick glance all your code looks good but I had a similar problem where the Quickform code was converting a hex value to it's decimal equivalent which was not what I wanted. Could this be something similar? Cheers, Brad -- Brad Hubbard Congo Systems 1/286 Bolton Street, Eltham Victoria, Australia, 3095. Email: brad@congosystems.com Ph: +61-3-94391200 Fax: +61-3-94391255 Mob: +61-419107559


« previous php.pear.general (#4227) next »