Quickform setDefaults for groups
| From: | Mike Carter | Date: | Wed, 06 Aug 2003 14:01:26 +0000 |
| Subject: | Quickform setDefaults for groups | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-7053@lists.php.net to get a copy of this message | ||
Hi,
Using Quickform i've got a group of elements.
$address[] = &HTML_QuickForm::createElement('text', 'address', '',
array('size'
=> '25', 'maxlength' => '255'));
$address[] = &HTML_QuickForm::createElement('static', '', '',
str_replace('#helptext#', $language['L_HelpAddress'], $helpButton));
$form->addGroup($address, 'addressGroup', $language['L_Address']);
But how do i go about setting a default to go in to my text box for this?
$form->setDefault(array('address' => "right here")); doesn't work.
The manual on the PEAR website doesn't mention much about using the function for
anything but simple defalt setting :-/
Regards,
Mike C.
--
http://www.buddasworld.co.uk
----------------------------------------------
This mail sent through http://www.ukonline.net