Wiki

Articles in category "how-tos", sorted by ratingX
Displaying 11-20 of 314 result(s).

Create your own Validation Rule

Created 3 years ago by nickcvHow-tos11 comments – viewed 126,338 times – ( +74 / -3 ) – version 1.1
Some times the core validation rules provided by Yii won't satisfy all your needs, so you'll need to create your very own validation rule.

Single sign on across multiple subdomains

Created 3 years ago by ianarĂ©How-tos9 comments – viewed 29,341 times – ( +31 ) – version 1.1
This had me stumped for a while so I figured it would be nice to share here to avoid others the grief.

Creating a jQueryUI Sortable CGridView

Created 3 years ago by blindMoeHow-tos22 comments – viewed 30,427 times – ( +45 / -1 ) – version 1.1
I have had to do this a couple of times now so I figured I would share it with the community. I am going to keep this short because I really hope that you are familiar with jQueryUI's Sortable class before starting this tutorial.

Configuring different sessions for backend and frontend in Yii advanced app

Created 5 months ago by Kartik VHow-tos0 comments – viewed 3,115 times – ( +30 ) – version 2.0
After you have setup your Yii2 advanced application, you now have setup your user authentication for both frontend and backend. However, if you have first logged into frontend, and try to access backend from the same client machine, you see no login screen, but find yourself automatically logged in.

Searching and Sorting by Count of Related Items in CGridView

Created 2 years ago by softarkHow-tos13 comments – viewed 30,358 times – ( +29 ) – version 1.1
Let's say we have two models and relation between them:

Enforcing "You must agree" requirements in forms

Created 3 years ago by Steve FriedlHow-tos3 comments – viewed 16,242 times – ( +29 ) – version 1.1
Checkboxes have two possible values, true and false, but some applications require that the user select one particular value before proceeding. Examples might be:
tags: validation

Multiple-database support in Yii

Created 3 years ago by Steve FriedlHow-tos14 comments – viewed 68,068 times – ( +28 ) – version 1.1
The customary configuration of a Yii application includes just a single database section in the protected/config/main.php file, but it's easy to extend this to support more than one, tying each Model to one of the databases.
tags: Database

Using the yii2-datecontrol extension along with yii2-detail-view widget

Created 5 months ago by Kartik VHow-tos0 comments – viewed 1,684 times – ( +28 ) – version 2.0
The yii2-datecontrol extension allows you to control separate date formats for display and saving for form inputs.

Nested inline active fields inside Bootstrap horizontal forms

Created 4 months ago by Kartik VHow-tos2 comments – viewed 4,698 times – ( +28 ) – version 2.0
Are you using the Bootstrap 3 form styles with Yii 2 Active Forms? Have you faced problems in displaying complex layouts which needs you to display multiple inline form fields in a single row, within bootstrap horizontal forms. Then read on.

Cookie management in Yii

Created 3 years ago by TrejderHow-tos5 comments – viewed 88,781 times – ( +41 / -1 ) – version 1.1
Cookie management in Yii is easy, but may not be so obvious for the beginners to this framework, so I wrote this simple article to clear some doubts out.