Yii 1.1: multiselect

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

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:

$this->widget('ext.multiselect.JMultiSelect',array(
      'model'=>$model,
      'attribute'=>'attribute',
      'data'=>$data,
      // additional javascript options for the MultiSelect plugin
      'options'=>array()
));

Total 3 comments

#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