require_once 'HTML/QuickForm.php';
object &HTML_QuickForm::addGroup (array $elements [, string $name = NULL [, mixed $groupLabel = '' [, string $separator = NULL [, string $appendName = TRUE]]]])
object &HTML_QuickForm::addGroup
Adds an element group.
array of elements composing the group
(optional) group name
(optional) group label
(optional) string or array of strings to separate elements
(optional) specify whether the group name should be used in the form element name: groupName[elementName] vs elementName
return reference to added group of elements
Table 43-1. Possible PEAR_Error values
since 2.8
This function can not be called statically.
Example 43-1. Using addGroup()
<?php $group[] =& HTML_QuickForm::createElement('text', 'first', 'First'); $group[] =& HTML_QuickForm::createElement('text', 'last', 'Last'); $form->addGroup($group, 'name', 'Name:', ', '); ?>