php - Yii Bootstrap Select 2 : Select a choice once -
php - Yii Bootstrap Select 2 : Select a choice once -
i'm using select2, , i've been reading documentation , have select2
$this->widget('bootstrap.widgets.tbselect2', array( 'name' => 'select', 'options' => array( 'tags' => $tags, ), 'htmloptions'=>array( 'style'=>'width:10px' ), 'asdropdownlist' => false, ));
let's $tags contain values red,blue,green , set multiple true. select them all, problem select reddish twice, or bluish twice. there way set status if selection selected, may no longer appear in list of choices?
first create sure every tag in list once, can filter out duplicates :
'data' => array_filter($data),
i have never used tbselect2, used eselect2 before. there documentation specificly yii's widget of eselect2
this how correctly set multiple parameter :
$this->widget('ext.select2.eselect2',array( 'name'=>'select', 'data'=>$data, 'htmloptions'=>array( 'multiple'=>'multiple', 'style'=>'width:10px' ), 'asdropdownlist' => false, ));
php twitter-bootstrap yii jquery-select2
Comments
Post a Comment