How to display Dependent drop-down value using ajax call with dynamically

Comparing #3 with #4

Revision #4 was created by Ankit Modi Ankit Modi on Jul 23, 2014, 8:36:08 AM.

change content

Content

[...]
```php
<div class="control-group">
<?php echo $form->label($model,'country',array('class'=>'control-label')); ?>
<div class="controls">

<?php echo $form->dropDownlist($model,'country',UtilityHtml::getCountryData(
$model->country), array('class'=>'m-wrap large tooltips','data-original-title'=>'Country'),
'ajax' => array(
'type'=>'POST',
'url'=>CController::createUrl('dynamicStates'),
'update'=>'#VkUsers_state',
'data'=>'js:$(this).serialize()+"&hidden_state='.$model->state.'"',
[...]