Re: Quickform setDefaults for groups
| From: | Bertrand Mansion | Date: | Wed, 06 Aug 2003 14:14:45 +0000 |
| Subject: | Re: Quickform setDefaults for groups | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-7055@lists.php.net to get a copy of this message | ||
<mikeatwork@ukonline.co.uk> wrote :
> 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 :-/
Did you try setDefaults(array('addressGroup' => array('address'=>'21
Jump
street')); ?
Bertrand Mansion
Mamasam