Wiki

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

By Example: CHtml

Created 8 years ago by jonahTutorials15 comments – viewed 858,359 times – ( +117 / -2 ) – version 1.1
"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.

Reference: Model rules validation

Created 7 years ago by krillzipHow-tos7 comments – viewed 749,031 times – ( +128 / -1 ) – version 1.1
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.

How to upload a file using a model

Created 8 years ago by qiangTutorials6 comments – viewed 448,044 times – ( +86 / -7 ) – version 1.1
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

How-To: Create a REST API

Created 6 years ago by jwernerHow-tos57 comments – viewed 362,838 times – ( +113 / -2 ) – version 1.1
This article will explain how to create a REST API with the Yii framework.

Creating a dependent dropdown

Created 8 years ago by dalipTutorials53 comments – viewed 334,207 times – ( +112 / -4 ) – version 1.1
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.

Yii for beginners

Created 6 years ago by rackyczTutorials13 comments – viewed 308,075 times – ( +99 / -1 ) – version 1.1
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.

Using CButtonColumn to customize buttons in CGridView

Created 7 years ago by TrejderHow-tos19 comments – viewed 292,867 times – ( +101 / -1 ) – version 1.1
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.

How to work with flash messages

Created 8 years ago by pfthTutorials12 comments – viewed 286,836 times – ( +60 / -1 ) – version 1.1
Set your messages in a controller:

Multiple files uploader with CMultiFileUpload

Created 4 years ago by InterboyHow-tos2 comments – viewed 267,055 times – ( +8 / -1 ) – version all
Today I will show you how to handle multiple file upload step by step.

Update content in AJAX with renderPartial

Created 8 years ago by BurzumTutorials17 comments – viewed 266,693 times – ( +60 / -1 ) – version 1.1
The easiest way to update content in AJAX is to use the renderPartial method.
tags: AJAX