/** * Prints out the field, wrapped in its group * * @return string */ public function wrapAndRender() { // Dry syntax (hidden fields, plain fields) if ($this->isUnwrappable()) { $html = $this->render(); // Control group syntax } elseif (Form::hasInstanceOpened()) { $html = $this->group->wrapField($this); // Classic syntax } else { $html = $this->currentFramework()->createLabelOf($this); $html .= $this->render(); } return $html; }