Wiki

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

Configuring different sessions for backend and frontend in Yii advanced app

Created 8 months ago by Kartik VHow-tos1 comment – viewed 5,370 times – ( +35 ) – 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.

Nested inline active fields inside Bootstrap horizontal forms

Created 7 months ago by Kartik VHow-tos2 comments – viewed 8,466 times – ( +33 ) – 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.

Create your own Validation Rule

Created 3 years ago by nickcvHow-tos12 comments – viewed 135,696 times – ( +75 / -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.

Creating a jQueryUI Sortable CGridView

Created 3 years ago by blindMoeHow-tos22 comments – viewed 32,209 times – ( +47 / -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.

Single sign on across multiple subdomains

Created 4 years ago by ianarĂ©How-tos9 comments – viewed 31,582 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.

Searching and Sorting by Count of Related Items in CGridView

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

Save and Display Date/Time Fields in different formats in Yii2

Created 8 months ago by Kartik VHow-tos10 comments – viewed 12,244 times – ( +30 ) – version 2.0
You would find having such a need in most Yii Projects. Your database needs a specific format to store date fields, while you may want to display it in different formats to the users on forms and other views.

Enforcing "You must agree" requirements in forms

Created 4 years ago by Steve FriedlHow-tos3 comments – viewed 17,258 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

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

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

Managing different Bootstrap form layouts with yii2-field-range extension.

Created 8 months ago by Kartik VHow-tos0 comments – viewed 4,479 times – ( +29 ) – version 2.0
This wiki will explain how you can use the Field range extension with multiple Bootstrap form layouts (vertical or horizontal). You maybe aware, that the yii2-field-range extension enables you to easily setup ActiveField range fields with Bootstrap styling. You basically can setup two attributes joined together like a single field with combined validation error block.