echo $form->labelEx($model, 'address'); ?> <?php echo $form->textField($model, 'address', array('size' => 60, 'maxlength' => 512)); ?> <?php echo $form->error($model, 'address'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'country'); ?> <?php echo $form->dropDownList($model, 'country', CountryStates::getCountries(), array('prompt' => 'Select Country', 'ajax' => array('type' => 'POST', 'url' => Yii::app()->createUrl('countries/dynamicStates'), 'data' => array('country' => 'js: $("#Clients_country option:selected").val()'), 'update' => '#Clients_state'), 'live' => false)); ?> <?php echo $form->error($model, 'country'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'state'); ?> <?php echo $form->dropDownList($model, 'state', CountryStates::getCountryStates($model->country), array('empty' => 'Select')); ?> <?php