First value of Dependent dropdown

This my form 3143

Screen Shot 2012-08-29 at 5.28.31 PM.png
. Only when I choose a different value in the State Dropdown the dependent dropdown works. What if the user wants the first value itself? Then he won’t be able to choose the City.

What’s a work around. My view file.




<div class="row">

		<?php echo $form->labelEx($model,'stateId'); ?>

		<?php echo $form->dropDownList($model,'stateId',CHtml::listData(State::model()->findAll(), 'id', 'name'), array(

'ajax' => array(

'type'=>'POST', //request type

'url'=>CController::createUrl('city'), //url to call.

//Style: CController::createUrl('currentController/methodToCall')

'update'=>'#cityId', //selector to update

//'data'=>'js:javascript statement' 

//leave out the data key to pass all form values through

))); ?>

		<?php echo $form->error($model,'stateId'); ?>

	</div>

	

	<div class="row">

		<?php echo $form->labelEx($model,'cityId'); ?>

		<?php echo CHtml::dropDownList('cityId','', array()); ?>

		<?php echo $form->error($model,'cityId'); ?>

	</div>






Use this for a drop down default value:





        <div class="row">

                <?php echo $form->labelEx($model,'cityId'); ?>

                <?php echo CHtml::dropDownList('cityId','', array(),array('empty'=>'--None Selected--')); ?>

                <?php echo $form->error($model,'cityId'); ?>

        </div>