QuickForm: Unrelated Grouped Elements

From: Date: Wed, 19 Feb 2003 19:32:12 +0000
Subject: QuickForm: Unrelated Grouped Elements
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-3846@lists.php.net to get a copy of this message
I want to group a few elements on the same line that are unrelated (don't share a name at all), but it appears that if I do this, it doesn't honor the default values. Here's my code: $default['status'] = 2; $default['approved'] = 't'; $form->setDefaults($default); $status = &HTML_QuickForm::createElement('select', 'status', 'Status:', $GLOBALS['conf']['status_keys']); $status->updateAttributes(array('onChange'=>'setBgColor(this, this.value)')); $approved = &HTML_QuickForm::createElement('advcheckbox', 'approved', null, 'Approved?', null, array('t','f')); $form->addGroup(array($status, $approved), null, 'Status:'); /* $status = &$form->addElement('select', 'status', 'Status:', $GLOBALS['conf'] ['status_keys']); $approved = &$form->addElement('advcheckbox', 'approved', null, 'Approved?', null, array('t','f')); */ If I comment out the top portion and uncomment the bottom, it works, but it's not quite what I want. I tried to figure out what the problems was to give a diff, but it's escaping me. -Dan

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