Yii Framework Forum: Problem With Dependable Dropdown In Update Page - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Problem With Dependable Dropdown In Update Page Problem with Dependable Dropdown in Update Page Rate Topic: -----

#1 User is offline   Balu 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 151
  • Joined: 09-August 11
  • Location:Kerala, India

Posted 28 March 2013 - 04:14 AM

I have used dependable drop down
<?php //echo $form->dropDownList($model,'country', CHtml::listData(Country::model()->findAll(), 'country_name', 'country_name'), array('empty'=>'Select Country'));
				echo  $form->dropDownList($model,'country',CHtml::listData(Country::model()->findAll(), 'country_name', 'country_name'),
				array(
				'ajax' => array(
				'type'=>'POST', 
				'url'=>CController::createUrl('State/Dropupdate1'), //url to call.
				'update'=>'#city_id123',
				),'empty'=>'Select Country')); 
	
echo $form->dropDownList($model,'state',array(), array('empty'=>'Select State','id'=>'city_id123')); 
		?>


This is working fine, on create page

But when we update this page the "State" is not selected in default,
How this is possible?
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users