/** * Add a fieldset to the form * * Create a fieldset container within the form. A group object is built to be * recursable by the form renderer. * * @return Nerd\Form\Group */ public function group() { $fields = func_get_args(); $group = new Form\Group(); if ($this->hasWrap()) { $group->wrap($this->wrap[0], $this->wrap[1]); } if ($this->hasFieldWrap()) { $group->wrapField($this->fieldWrap[0], $this->fieldWrap[1]); } foreach ($fields as $field) { $group->field($field); } $this->fields->add($group); return $group; }