Difference between #6 and #7 of
Creating a Dependent Dropdown From Scratch in Yii2

Revision #7 has been created by alrazi on Nov 21, 2017, 2:48:36 PM with the memo:

fix typo
« previous (#6)

Changes

Title unchanged

Creating a Dependent Dropdown From Scratch in Yii2

Category unchanged

How-tos

Yii version unchanged

Tags unchanged

yii2, dependent dropdown

Content changed

I have read http://www.yiiframework.com/wiki/24/creating-a-dependent-dropdown/ (Dependen Dropdown Yii1), but I can't implementation it in Yii2 because Yii2 notdoes not have built-in AJAX functionality hem.. I am searched about it and get this statemencame across this post > qiangxue commented on Aug 28, 2013 In 2.0 we removed most in-page js code. You should write explicit js code in external js files to achieve similar result as in 1.1. The code is very trivial though. So we must create our own code hehe oh no we can use great extension http://demos.krajee.com/widget-details/depdrop, this right but some one dislike use third party too much.. Oke I try to explain You about this classic case :)
### Create Dropdown
First, You should know how to make dropdown in Yii2, I use activefield
[...]
echo "<option value='".$post->id."'>".$post->title."</option>";
}
} else
 {
echo "<option>-</option>";
}

}
```
[...]
4 1
12 followers
Viewed: 147 335 times
Version: 2.0
Category: How-tos
Written by: ThePr0f3550r
Last updated by: alrazi
Created on: Jul 2, 2014
Last updated: 6 years ago
Update Article

Revisions

View all history