Yii Method To Disable Selected Options From Multi Select Dropdown

I am using yii dropdown with active records in that i am using multiselect dropdown. i am creating data with in which i am selected multiple option from dropdown… while updating i want to disable selected option which i selected at time of creation.

<code>

<?php

$savedSections = helpers::getQuestionnaireSectionList($model->questionnaire_id);

$data = helpers::getSection();

$listData = CHtml::listData($data, ‘section_id’, ‘section_name’);

$htmlOptions = array(‘size’ => ‘5’, ‘multiple’ => ‘true’,‘style’=>‘width: 333px’);

$queSection->section_ref_id = $savedSections; #sec2

echo $form->listBox($queSection,‘section_ref_id’,$listData, $htmlOptions); #sec1

?>

<code>

now here #sec1 is showing output with multiple option and i am also getting selected options but i want to disabled all the selected option which is coming from #sec2

Please help me if you have any idea.

regards anil

hi guys,

Same like following code you have to do–

<div class="input_Slide">

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


    	&lt;div class=&quot;vers&quot;&gt; 


        	&lt;?php 


            	if(&#036;modelArticle-&gt;isNewRecord){ 


             		echo &#036;form-&gt;dropDownList(&#036;modelArticle,'enabled_version[]',&#036;version_list,array('multiple'=&gt;true,'readonly'=&gt;true)); 


            	}else{ ?&gt; 


                	&lt;select id=&quot;versions&quot; name=&quot;enabled_version[]&quot; class=&quot;dropdown&quot; multiple=&quot;multiple&quot;&gt; 


                    	&lt;?php 


                    	&#036;i=0; 


                    	foreach (&#036;version_list as &#036;item=&gt;&#036;val) : ?&gt; 


                        	&lt;option 


                     		&lt;?php if(in_array(&#036;item, &#036;versions)){echo 'selected=&quot;selected&quot; '; } ?&gt; 


                            	value=&quot;&lt;?php echo &#036;item ?&gt;&quot;&gt;&lt;?php echo &#036;val ?&gt;&lt;/option&gt; 


                        	&lt;?php endforeach ?&gt; 


                	&lt;/select&gt; 


        	&lt;?php   }    ?&gt; 


    	&lt;/div&gt; 


	&lt;?php  echo &#036;form-&gt;error(&#036;modelArticle,'enabled_version'); ?&gt; 


	&lt;/div&gt;

I have tried to use this extension, but I several problems arise

1-not the dropdown closes when I choose an item

2-close button does not work me

3-when I give "insert" an element over my application throws me the error "field must be a number", the primary keys are integers and auto-increment

any idea?