public function renderField()
    {
        list($name, $id) = $this->resolveNameID();

        TbArray::defaultValue('id', $id, $this->htmlOptions);
        TbArray::defaultValue('name', $name, $this->htmlOptions);

        // fixes #32: 'multiple' will be forced later in jQuery plugin
        $this->htmlOptions['multiple'] = 'multiple';

        if ($this->hasModel()) {
            echo CHtml::activeDropDownList($this->model, $this->attribute, $this->data, $this->htmlOptions);
        } else {
            echo CHtml::dropDownList($this->name, $this->value, $this->data, $this->htmlOptions);
        }
    }
public function renderField()
    {
        list($name, $id) = $this->resolveNameID();

        TbArray::defaultValue('id', $id, $this->htmlOptions);
        TbArray::defaultValue('name', $name, $this->htmlOptions);

        // fixes #32: 'multiple' will be forced later in jQuery plugin
        $this->htmlOptions['multiple'] = 'multiple';

        if ($this->hasModel()) {
            echo CHtml::activeDropDownList($this->model, $this->attribute, $this->data, $this->htmlOptions);
        } else {
            echo CHtml::dropDownList($this->name, $this->value, $this->data, $this->htmlOptions);
        }
    }
public function renderField ( ) { list ( $ name , $ id ) = $ this -> resolveNameID ( ) ; TbArray :: defaultValue ( 'id' , $ id , $ this -> htmlOptions ) ; TbArray :: defaultValue ( 'name' , $ name , $ this -> htmlOptions ) ; // fixes #32: 'multiple' will be forced later in jQuery plugin $ this -> htmlOptions [ 'multiple' ] = 'multiple' ; if ( $ this -> hasModel ( ) ) { echo CHtml :: activeDropDownList ( $ this -> model , $ this -> attribute , $ this -> data , $ this -> htmlOptions ) ; } else { echo CHtml :: dropDownList ( $ this -> name , $ this -> value , $ this -> data , $ this -> htmlOptions ) ; } }
Renders the multiselect field
Renders the multiselect field