/** * Renders all other HTML inputs (except HTML5) * * @return string */ protected function renderInput() { $list = Config::isDropdownInput($this->inputType); $input = $this->inputType; if ($this->hasModel()) { if (isset($this->_form)) { return $list ? $this->_form->field($this->model, $this->attribute, $this->inputFieldConfig)->{$input}($this->data, $this->_inputOptions)->label(false) : $this->_form->field($this->model, $this->attribute, $this->inputFieldConfig)->{$input}($this->_inputOptions)->label(false); } $input = 'active' . ucfirst($this->inputType); } $checked = false; if ($input == 'radio' || $input == 'checkbox') { $this->options['value'] = $this->value; $checked = ArrayHelper::remove($this->_inputOptions, 'checked', false); } if ($list) { $field = Html::$input($this->name, $this->value, $this->data, $this->_inputOptions); } else { $field = $input == 'checkbox' || $input == 'radio' ? Html::$input($this->name, $checked, $this->_inputOptions) : Html::$input($this->name, $this->value, $this->_inputOptions); } return Html::tag('div', $field, $this->inputContainerOptions); }