Wiki

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

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

Created 2 years ago by Kartik VHow-tos12 comments – viewed 77,788 times – ( +39 ) – 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 5 years ago by rsinghHow-tos16 comments – viewed 97,936 times – ( +38 ) – version 1.1
"The documentation for CMultiFileUpload isn't clear!"

Actions code reuse with CAction

Created 5 years ago by Antonio RamirezHow-tos13 comments – viewed 39,546 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 2 years ago by Kartik VHow-tos0 comments – viewed 13,814 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 2 years ago by Kartik VHow-tos0 comments – viewed 7,715 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 5 years ago by nickcvHow-tos13 comments – viewed 180,681 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 39,471 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 5 years ago by ianarĂ©How-tos10 comments – viewed 41,937 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 4 years ago by softarkHow-tos13 comments – viewed 41,955 times – ( +31 ) – version 1.1
Let's say we have two models and relation between them:

Multiple-database support in Yii

Created 5 years ago by Steve FriedlHow-tos18 comments – viewed 98,845 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