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

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

Created about a year ago by Kartik VHow-tos10 comments – viewed 44,329 times – ( +38 ) – 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.

Uploading multiple images with CMultiFileUpload

Created 4 years ago by rsinghHow-tos16 comments – viewed 90,727 times – ( +38 ) – version 1.1
"The documentation for CMultiFileUpload isn't clear!"

Actions code reuse with CAction

Created 4 years ago by Antonio RamirezHow-tos13 comments – viewed 36,460 times – ( +36 ) – version 1.1
We all know how good 'gii' automates the code for us and we normally tend to be happy with what that tool offers at the beginning of our Yii learning curve. But as soon as you start working in larger and larger projects, you realize that its code is too repetitive to maintain and having a small pitfall in general actions means to go over and over through them to fix the issues.
tags: CAction, Tutorial

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

Created about a year ago by Kartik VHow-tos0 comments – viewed 9,076 times – ( +36 ) – 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.

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

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

Create your own Validation Rule

Created 4 years ago by nickcvHow-tos13 comments – viewed 162,354 times – ( +76 / -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 4 years ago by blindMoeHow-tos23 comments – viewed 36,653 times – ( +48 / -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-tos10 comments – viewed 37,656 times – ( +32 ) – 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 3 years ago by softarkHow-tos13 comments – viewed 37,949 times – ( +31 ) – version 1.1
Let's say we have two models and relation between them:

Multiple-database support in Yii

Created 4 years ago by Steve FriedlHow-tos18 comments – viewed 88,350 times – ( +29 ) – 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