Esempio n. 1
0
 /**
  * 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::activeDropDownList($this->model, $this->attribute, $this->data, $this->htmlOptions);
     } else {
         echo WhHtml::dropDownList($this->name, $this->value, $this->data, $this->htmlOptions);
     }
 }