Wiki

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

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

Created 2 years ago by Kartik VHow-tos12 comments – viewed 102,028 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 6 years ago by rsinghHow-tos16 comments – viewed 101,944 times – ( +38 ) – version 1.1
"The documentation for CMultiFileUpload isn't clear!"

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

Created 2 years ago by Kartik VHow-tos0 comments – viewed 16,900 times – ( +37 ) – 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.

Actions code reuse with CAction

Created 6 years ago by Antonio RamirezHow-tos13 comments – viewed 41,468 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

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

Created 2 years ago by Kartik VHow-tos0 comments – viewed 9,317 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 6 years ago by nickcvHow-tos14 comments – viewed 193,674 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 5 years ago by blindMoeHow-tos23 comments – viewed 41,329 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 6 years ago by ianarĂ©How-tos10 comments – viewed 44,622 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 5 years ago by softarkHow-tos13 comments – viewed 44,473 times – ( +31 ) – version 1.1
Let's say we have two models and relation between them:

Displaying, Sorting and Filtering Model Relations on a GridView

Created 2 years ago by Antonio RamirezHow-tos12 comments – viewed 131,991 times – ( +44 / -1 ) – version 2.0
One of the things you will find tricky to implement is the the sorting and filtering of a GridView's column that displays related model data.