/** * {@inheritdoc} */ public function html($html = null) { if ($html !== null) { parent::html($html); } $html = ''; //render the fieldsets not belonging to form foreach ($this->children as $fieldset) { if ($fieldset->getParent() === $this) { $html .= (string) $fieldset; } } //render the fieldsets if (!empty($this->fieldsets)) { foreach ($this->fieldsets as $fieldset) { $html .= (string) $fieldset; } } return $html; }