checkboxList in dropdownList


I am new to this framework, and i want to have checkboxlist combined with dropdownlist and i could’nt do it, please does someone have eny idea !! :s

i want to have my dropdownlist with the possibility to select many fields



You can use this extension to do that: I am using it and it is really straight forward. It is a wrapper for the Chosen JQuery Plugin (

thank you Haensel for this extension i’ve tried it but it does’nt show anything

<?php $this->widget( 'ext.EChosen.EChosen', array(

  'target' => 'select',

  'useJQuery' => false,

  'debug' => true,

)); ?>

do you know what should i do please

Simply create a checkboxlist somewhere in your view and place the above code in the same view. The code only transforms a checkboxlist but doesn’t create one for you.

use this link…i solved the same by using this.

in your layout main.php


paste this with [/b]

<link rel="stylesheet" type="text/css" href="<?php //echo Yii::app()->request->baseUrl; ?>/css/jquery-ui-1.8.13.custom.css" />

<link rel="stylesheet" type="text/css" href="<?php //echo Yii::app()->request->baseUrl; ?>/css/ui.dropdownchecklist.themeroller.css" />


    &#036;cs = Yii::app()-&gt;clientScript;

    &#036;cs-&gt;scriptMap = array(

        'jquery.js' =&gt; Yii::app()-&gt;request-&gt;baseUrl . '/js/jquery-1.6.1.min.js',

        'jquery-ui-1.8.13.custom.min.js' =&gt; Yii::app()-&gt;request-&gt;baseUrl . '/js/jquery-ui-1.8.13.custom.min.js',




    &lt;?php Yii::app()-&gt;clientScript-&gt;registerScriptFile(Yii::app()-&gt;request-&gt;baseUrl . '/js/ui.dropdownchecklist-1.4-min.js'); ?&gt;


in your root directory

put these files with in the directory(js,css,src)






Make sure to have your array(‘multiple’=>‘multiple’)

in dropDownList form element.

and in _form.php

use this

<script type="text/javascript">

var &#036;storeDir1 = jQuery.noConflict();


    &#036;storeDir1('#Modelname_DropdownlistId').dropdownchecklist({icon: {},maxDropHeight: 150,Width:100, emptyText: &quot;Select&quot;});


use your model name and dropdownlist id


these are directory with file name.should be in root directory

Hope will solve your problem.

reply if ur getting any problem

Best wishes.