Re: Another QuickForm question

From: Date: Fri, 14 Mar 2003 06:47:00 +0000
Subject: Re: Another QuickForm question
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-4230@lists.php.net to get a copy of this message
On Fri, 14 Mar 2003 14:41 Australia/Melbourne, ASCII characters were aligned thusly: > Can anyone suggest a method to make my select menu have a default > option of Choose or something? Can I do this in QuickForm? How 'bout; $form_get_p->addElement('select', 'person', 'Edit Person:', null); $select = &$form_get_p->getElement('person'); $select->setSize(1); $select->setMultiple(false); $select->addOption( 'Select From Results', '-1' ); // or 0 or 10000 $select->loadArray( $qper ); Pardon my ignorance (it knows no bounds ;-) but what does the call to setSize() do? I know it sets a "size" option but what does that control? The description in select.php appears to be incomplete. Bertrand, I have version 1.16 /** * Sets the select field size, only applies * * @param int $size Size of select field only applies when???? 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 (#4230) next »