Difference between #8 and #9 of
Creating a dependent dropdown

Revision #9 has been created by Imdad Hussain on Dec 30, 2011, 6:41:38 AM with the memo:

Need to Enter Current Controller name before in $_POST array because yii Post Multi Dimentional array like $_POST['User']['country_id'] etc (yii 1.8)
« previous (#8) next (#10) »

Changes

Title unchanged

Creating a dependent dropdown

Category unchanged

Tutorials

Yii version unchanged

Tags unchanged

AJAX

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');
foreach($data as $value=>$name)
{
echo CHtml::tag('option',
[...]
83 2
92 followers
Viewed: 416 807 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