Quickform->setDefaults and Groups

From: Date: Mon, 03 Mar 2003 16:28:44 +0000
Subject: Quickform->setDefaults and Groups
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-4029@lists.php.net to get a copy of this message
Hi, Does anybody know how I can set the default values for a grouped elements added to the form object with following code? $ceo['title'] = &HTML_QuickForm::createElement('text', 'ceo_title'); $ceo['fname'] = &HTML_QuickForm::createElement('text', 'ceo_fname'); $ceo['lname'] = &HTML_QuickForm::createElement('text', 'ceo_lname'); $form->addGroup($ceo, null, 'CEO', ' '); I can do: $DEFAULTS['ceo'] = array("ceo_title"=>'test', "ceo_fname"=>'test', "ceo_lname"=>'test'); but that only works when I set the groupname to ceo and I explicitly keep it null because otherwise my record in the DB does not get updated. I don't want the grouped elements to become an HTML array, I just want them to be grouped so I can easily use groupTemplates. Maybe that's not what groups are meant for.. Jeroen

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