Wiki

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

By Example: CHtml

Created 7 years ago by jonahTutorials15 comments – viewed 799,524 times – ( +117 / -1 ) – 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 702,098 times – ( +126 ) – 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 7 years ago by qiangTutorials6 comments – viewed 424,353 times – ( +86 / -6 ) – 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 include Javascript, CSS

Created 3 years ago by InterboyHow-tos4 comments – viewed 377,020 times – ( +11 / -3 ) – version 1.1
There are many methods that we can include javascript, css into your Yii App. Today I will demonstrate three simple and helpul methods.

How-To: Create a REST API

Created 5 years ago by jwernerHow-tos56 comments – viewed 335,056 times – ( +113 / -1 ) – version 1.1
This article will explain how to create a REST API with the Yii framework.

Creating a dependent dropdown

Created 7 years ago by dalipTutorials53 comments – viewed 319,088 times – ( +111 / -3 ) – 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 5 years ago by rackyczTutorials13 comments – viewed 292,651 times – ( +99 ) – 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 6 years ago by TrejderHow-tos19 comments – viewed 274,792 times – ( +101 ) – 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.

Multiple files uploader with CMultiFileUpload

Created 3 years ago by InterboyHow-tos2 comments – viewed 262,981 times – ( +8 ) – version all
Today I will show you how to handle multiple file upload step by step.

How to work with flash messages

Created 7 years ago by pfthTutorials12 comments – viewed 257,083 times – ( +60 ) – version 1.1
Set your messages in a controller: