/** * Renders the multiselect field */ public function renderField() { list($name, $id) = $this->resolveNameID(); $this->htmlOptions = WhHtml::defaultOption('id', $id, $this->htmlOptions); $this->htmlOptions = WhHtml::defaultOption('name', $name, $this->htmlOptions); if ($this->hasModel()) { echo WhHtml::activeTextField($this->model, $this->attribute, $this->htmlOptions); } else { echo WhHtml::textField($this->name, $this->value, $this->htmlOptions); } }