Yii 1.1: multiselect

This extension adds a multiselect dropdown list. It implements all options of jQuery MultiSelect.

This extension adds a multiselect dropdown list. It implements all options of jQuery MultiSelect To use this widget, you may insert the following code in a view:

      // additional javascript options for the MultiSelect plugin

Total 4 comments

#19574 report it
rajesh chaurasia at 2015/09/14 01:52am
nice extension also you can create custom multiselect by ajax (using tokenizer js).

http://www.jqueryrain.com/2014/09/tokenize-jquery-select-multiple-items-autocomplete/ download this plugin and add his js and css in your code Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . '/js/jquery.tokenize.js', CClientScript::POS_END); Yii::app()->clientScript->registerCssFile(Yii::app()->theme->baseUrl . '/css/jquery.tokenize.css');

and in view place : in js write :

#9834 report it
vinu at 2012/09/14 04:59am
Pre selected items

how to pass array for items to be set as preselected or pre-checked. Is there any parameter to set in options array....? Please guide..its urgent

#7281 report it
jerome nicholas at 2012/03/09 05:39pm
code error

nice extension, good job theres a code error

i was getting an error "citysFilter" ??? maybe it was coded for city dropdown list anyway this is a pretty nice tool :) again keep up the good work.

//echo CHtml::activeDropDownList($this->model, 'citysFilter', $this->data, $this->htmlOptions); echo CHtml::activeDropDownList($this->model, $this->attribute, $this->data, $this->htmlOptions);

and change the init function string (noneSelectedText and selectedText) to something meaningfull /** * Initializes the widget. */ public function init() { parent::init(); $this->registerScripts(); $this->htmlOptions['multiple'] = 'multiple'; $this->options = array_merge(array( 'header' => false, 'selectedList' => 4, 'noneSelectedText' => 'Select an option', 'selectedText' => '# selected', ), $this->options); }

#5979 report it
thyseus at 2011/12/02 06:46am
Nice !

Also check http://www.yiiframework.com/extension/emultiselect for a similar jquery plugin!

Leave a comment

Please to leave your comment.

Create extension