How To Get Data Dropdownlistgroup From Ajax?

I am using the ‘booster.widgets.TbActiveForm’ and,

My code is :




echo $form->dropDownListGroup($model,'countryid',array(

					'widgetOptions'=>array(

						'data'=>CHtml::listData(Country::model()->findAll(),'id','name')

						)

					array('ajax'=>array(

						'type'=>'POST',

						'url'=>Yii::app()->createUrl('/person/city'),

						'update'=>'#Person_cityid',

						))

					)

				);



but it’s not work.

waiting for your help :)

This is an old question but I was searching the same and this is the answer:




echo $form->dropDownListGroup($model,'countryid',array(

                                        'widgetOptions'=>array(

                                                'data'=>CHtml::listData(Country::model()->findAll(),'id','name')

                                                'htmlOptions' => array(

					            'empty' => '',

					            'ajax'=>array(

                      	                               'type'=>'POST',

                                                       'url'=>Yii::app()->createUrl('/person/city'),

                                                       'update'=>'#Person_cityid',

                                                    )

                                                ),

                                        )

                                );