Wiki

Sorted by viewsX
Displaying 1-10 of 467 result(s).

Reference: Model rules validation

Created 3 years ago by krillzipHow-tos4 comments – viewed 250,623 times – ( +84 )
This is a reference to be used for Model rule validation and is compiled from the Yii documentation and code. The purpose is to have all the information gathered in one place instead of scattered. This reference is not an intro. See The Definitive Guide to Yii, Declaring Validation Rules for a tutorial.

By Example: CHtml

Created 3 years ago by jonahTutorials7 comments – viewed 240,922 times – ( +80 )
"By Example" cookbook pages will provide coding examples for many of the commonly used classes within Yii. We will try to provide as many usage examples as possible for keep these pages as helpful as possible.

How to upload a file using a model

Created 4 years ago by qiangTutorials21 comments – viewed 172,048 times – ( +68 / -6 )
First declare an attribute to store the file name in the model class (either a form model or an active record model). Also declare a file validation rule for this attribute to ensure a file is uploaded with specific extension name.
tags: File upload

Creating a dependent dropdown

Created 4 years ago by dalipTutorials19 comments – viewed 138,116 times – ( +84 / -2 )
Often you'll need a form with two dropdowns, and one dropdown's values will be dependent on the value of the other dropdown. Using Yii's built-in AJAX functionality you can create such a dropdown.
tags: AJAX

NetBeans IDE and Yii projects

Created 2 years ago by marcovtwoutTutorials28 comments – viewed 121,132 times – ( +69 )
This page is created to supply short directions and general tips for managing a Yii application in NetBeans IDE.

Yii for beginners

Created about a year ago by rackyczTutorials11 comments – viewed 105,738 times – ( +74 )
Hi. This is first article with my Yii tutorial. I had to split it into more articles as there's limited length of texts on Wiki. So once you understand basics, you can read next article here: Yii for beginners 2.

How-To: Create a REST API

Created 2 years ago by jwernerHow-tos38 comments – viewed 103,746 times – ( +86 / -1 )
This article will explain how to create a REST API with the Yii framework.

Using CButtonColumn to customize buttons in CGridView

Created 2 years ago by TrejderHow-tos15 comments – viewed 102,679 times – ( +81 )
CGridView is a one of most flexible widgets in Yii and example its flexibility is CButtonColumn used to build buttons for steering model in each grid row. Here in this how-to we will explain ways user can customize CButtonColumn to flexibly fit it to its needs.

Update content in AJAX with renderPartial

Created 3 years ago by BurzumTutorials8 comments – viewed 86,174 times – ( +49 )
The easiest way to update content in AJAX is to use the renderPartial method.
tags: AJAX

How to work with flash messages

Created 4 years ago by pfthTutorials9 comments – viewed 83,251 times – ( +48 )
Set your messages in a controller: