Multiple Selection

hi i need to add multiple selection box to my app like screenshot

i use http://www.yiiframework.com/extension/multiselect/files/multiselect.zip

i extract this in protected\extensions\multiselect folder

i need insert city id in following data table

CREATE TABLE IF NOT EXISTS tect (

id int(60) NOT NULL AUTO_INCREMENT,

name int(11) NOT NULL,

PRIMARY KEY (id)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

[color="#FF0000"] <?php $this->widget(‘ext.multiselect.JMultiSelect’,array(

 'model'=&gt;&#036;model,


  'attribute'=&gt;'name',


 


  'selected'=&gt;array('0','1','3'),


  'data'=&gt;array('1'=&gt;'Colombo','2'=&gt;'mathara','3'=&gt;'galle'),


  // additional javascript options for the MultiSelect plugin


  'options'=&gt;array()

)); ?>[/color]

i have following Error

Property "Tect.citysFilter" is not defined.

how solve this

OR have any extension

HELLO…

a solution can be…

code js


<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>

<script>

$(document).ready(function() 

{

 $(function () {

    $('.my_class').on('click', function () {

        $(this).closest('fieldset').find(':checkbox').prop('checked', this.checked);

    });

});

});

	</script>

in your html 

<fieldset>

    <div><input type="checkbox" class="my_class"> Check all</div>

     <div><input type="checkbox"> Checkbox</div>

    <div><input type="checkbox"> Checkbox</div>

    <div><input type="checkbox"> Checkbox</div>

</fieldset>

i need select multiple list using multiple list box how do this have code or extention

Hi

I have already wrote an wiki in more complex issue!

take a look

http://www.yiiframework.com/wiki/547/visualization-tree-multi-subcategories-as-listbox-or-dropdownlist/

in practice yuo need something like that in view


$form->listBox($model, 'listCategories', array(1=>'text1',2=>'text2'...), $htmlOptions);

i need multiple select in list box i used this i drop database data but couldnt make insert id whch i select using list box please …how do this

i use this extention

http://www.yiiframew…multiselect.zip

this is my code

<div class="row">

	&lt;?php echo &#036;form-&gt;labelEx(&#036;model,'name'); ?&gt;


         &lt;?php &#036;this-&gt;widget('ext.multiselect.JMultiSelect',array(


             'name'=&gt;'name',


             'selected'=&gt;(''),


            'data'=&gt;User::model()-&gt;getUseroptions(),


         // additional javascript options for the MultiSelect plugin


            'options'=&gt;array()

)); ?>

this is my data table

User table

CREATE TABLE IF NOT EXISTS user (

Id int(50) NOT NULL AUTO_INCREMENT,

Name varchar(250) NOT NULL,

PRIMARY KEY (Id),

KEY Id (Id)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;

– Dumping data for table user

INSERT INTO user (Id, Name) VALUES

(1, ‘indi’),

(2, ‘ona’),

(3, ‘koshi’),

(4, ‘channa’);

tech table

CREATE TABLE IF NOT EXISTS tect (

id int(60) NOT NULL AUTO_INCREMENT,

name int(11) NOT NULL,

PRIMARY KEY (id)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=9 ;

i need save userid in tech name filed

i need multiple select in list box i used this i drop database data but couldnt make insert id whch i select using list box please …how do this

i use this extention

http://www.yiiframew…multiselect.zip

this is my code

<div class="row">

	&lt;?php echo &#036;form-&gt;labelEx(&#036;model,'name'); ?&gt;


         &lt;?php &#036;this-&gt;widget('ext.multiselect.JMultiSelect',array(


             'name'=&gt;'name',


             'selected'=&gt;(''),


            'data'=&gt;User::model()-&gt;getUseroptions(),


         // additional javascript options for the MultiSelect plugin


            'options'=&gt;array()

)); ?>

this is my data table

User table

CREATE TABLE IF NOT EXISTS user (

Id int(50) NOT NULL AUTO_INCREMENT,

Name varchar(250) NOT NULL,

PRIMARY KEY (Id),

KEY Id (Id)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;

– Dumping data for table user

INSERT INTO user (Id, Name) VALUES

(1, ‘indi’),

(2, ‘ona’),

(3, ‘koshi’),

(4, ‘channa’);

tech table

CREATE TABLE IF NOT EXISTS tect (

id int(60) NOT NULL AUTO_INCREMENT,

name int(11) NOT NULL,

PRIMARY KEY (id)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=9 ;

i need save userid in tech name filed

[color="#556B2F"]/* Other 2 topics have been merged into this one. */[/color]

[color="#FF0000"]/* Please stop creating new topics that are almost the same as the existing one. */[/color]