Yii2 Framework

Yii2 Tips 28 : Dependent Dropdown Without Extension

This tip will show you how to create dependent dropdown without using any extensions. 1. Create table country and table city. 2. Create models Country and City using gii. 3. Add actionDependentDropdown on your controller (i.e. TestController.php)

4. Add the view file, dependent-dropdown.php inside the view folder, take note to the ‘onchange’ event when the Read more about Yii2 Tips 28 : Dependent Dropdown Without Extension[…]

Yii2 Framework

Yii2 Tips 27 : Import Data from Excel

1. Install yii2 export

2. Excel file , i.e (take note on the baseRow and baseColumn) : 3. Create table and the model

4. Put actionImport (or whatever the name is), to your controller

5. Create import.php

Yii2 Framework

Yii2 Tips 26 : All About Gridview

This is my personal notes on Gridview and their tips. First, I have gridview table with the following structure and content : Next step is to create the GridviewModel model and the CRUD using Gii. A. Gridview Tips : Dropdown Search using Kartik Gridview The end result will be like this, there is dropdown list Read more about Yii2 Tips 26 : All About Gridview[…]

Yii2 Framework

Yii2 Tips 25 : All About Form Validation

Model

Controller

View

Yii2 Framework

Yii2 Tips 24 : All About ActiveForm

Model

  Controller

View Form