/** * Initializes the widget. * This renders the form open tag. */ public function init() { if (!isset($this->options['id'])) { $this->options['id'] = $this->getId(); } if (isset($this->onsubmit)) { $this->options['onsubmit'] = $this->onsubmit; } echo Html::beginForm($this->action, $this->method, $this->options); echo Html::hiddenInput('navTabId', \yii\dwz\TreeVisitor::generateId($this->navTabName)); echo Html::beginTag('div', $this->formDivOptions); }
public function begin() { if ($this->form->enableClientScript) { $clientOptions = $this->getClientOptions(); if (!empty($clientOptions)) { $this->form->attributes[] = $clientOptions; } } $options = $this->options; $tag = ArrayHelper::remove($options, 'tag', 'div'); return Html::beginTag($tag, $options); }