Difference between #10 and #15 of
Creating a dependent dropdown

Changes

Title unchanged

Creating a dependent dropdown

Category unchanged

Tutorials

Yii version unchanged

Tags changed

AJAX, drop down list

Content changed

[...]
```php
public function actionDynamiccities()
{
//please enter current controller name because yii send multi dim array 
 
$data=Location::model()->findAll('parent_id=:parent_id', array(':parent_id'=>(int) $_POST['Current-Controller']['country_id']));

$data=CHtml::listData($data,'id','name');
[...]
in the filters() Method. This will disable all access controls for the controller. You should always re-enable it after testing.

###Related Links [Chinese version](http://www.itkuaixun.com/bbs/thread-202-1-1.html-------------
 
[Persian version](http://shgn.ir/%D8%A7%DB%8C%D8%AC%D8%A7%D8%AF-%D9%84%DB%8C%D8%B3%D8%AA-%D9%87%D8%A7%DB%8C-%D9%88%D8%A7%D8%A8%D8%B3%D8%AA%D9%87-%D8%A8%D9%87-%D9%87%D9%85-%D8%AF%D8%B1-yii/ "Persian Version"
)
83 2
92 followers
Viewed: 412 215 times
Version: 1.1
Category: Tutorials
Written by: dalip
Last updated by: Paul_Kish
Created on: Mar 23, 2009
Last updated: 9 years ago
Update Article

Revisions

View all history