Quickform group element default
| From: | Mike Carter | Date: | Tue, 22 Jul 2003 10:34:16 +0000 |
| Subject: | Quickform group element default | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-6710@lists.php.net to get a copy of this message | ||
Hi
i have three quickform elements in a group. the three elements represent the
parts of a persons name 'title', 'firstname', 'surname'.
$adult["title"] = &HTML_QuickForm::createElement('select',
'title', '', $titles);
$adult["firstname"] = &HTML_QuickForm::createElement('text',
'firstname', '',
array('size' => 25, 'maxlength' => 30));
$adult["surname"] = &HTML_QuickForm::createElement('text',
'surname', '',
array('size' => 25, 'maxlength' => 30));
They are grouped into a group names 'adultGroup'.
$form->addGroup($adult, "adultGroup", $language['L_AdultName']);
i would like to set the default only in the 'surname' box.
Looking at
http://www.appelsiini.net/~tuupola/php/peardoc2/package.html.html-quickform.html-quickform.setdefaults.html
there is no explination of setting an elements default when it is within a group.
How is it done? and can the documentation be merged in to the weekly pear docs
build ? please please :-)
Regards,
Mike Carter.
--
http://www.buddasworld.co.uk
----------------------------------------------
This mail sent through http://www.ukonline.net