Wiki articles in category How-tos tagged with "model"

Showing 1-11 of 11 items.

How To: Custom Client Validation On Checkbox Toggle and Optional Input Field

Created 2 years ago by Wade Shuler, updated 2 years ago by Wade Shuler.

I just chased my tail around for a bit today. I got lost with setting the status of all inputs, and banging my head on why the "validate" function just wasn't working.

0 0
1 follower
Viewed: 11 772 times
Version: 2.0
Category: How-tos

Insert a model record using CGridview

Created 5 years ago by Kostas Apazidis (KonApaz), updated 5 years ago by Kostas Apazidis (KonApaz).

CGridview displays existent rows of the table (using DataProvider)

2 0
1 follower
Viewed: 13 160 times
Version: 1.1
Category: How-tos

Generate CTreeview from database table and update a model

Created 5 years ago by Kostas Apazidis (KonApaz), updated 5 years ago by Kostas Apazidis (KonApaz).

Suppose we want to set a category to product (or an item in general term), Also suppose categories has sub-categories (multi-level)

1 0
1 follower
Viewed: 9 141 times
Version: 1.1
Category: How-tos

Update CGridview row separately using ajax request

Created 5 years ago by Kostas Apazidis (KonApaz), updated 5 years ago by Kostas Apazidis (KonApaz).

There are cases you want to update a record on CGridview directly

5 0
8 followers
Viewed: 19 870 times
Version: 1.1
Category: How-tos

Take more control of CGridview and model searching (related model or another controller)

Created 5 years ago by Kostas Apazidis (KonApaz), updated 5 years ago by CeBe.

Suppose you have an Application in Yii that manages hotels each one has many customers.

2 0
6 followers
Viewed: 35 417 times
Version: 1.1
Category: How-tos

ClientValidation for files (modern browsers)

Created 5 years ago by Kostas Apazidis (KonApaz), updated 5 years ago by CeBe.

There are cases that you want to validate the file format, size, extension etc but how to do that without submit the form ?

2 0
6 followers
Viewed: 13 016 times
Version: 1.1
Category: How-tos

"safe" and "unsafe" Model validators (massive assignments)

Created 5 years ago by Kostas Apazidis (KonApaz), updated 2 years ago by brianvu.

Ok, it is a little bit difficult to full understanding the unsafe validator.

2 2
7 followers
Viewed: 27 336 times
Version: 1.1
Category: How-tos

Generate a multi-lever array sub-category for a menu

Created 5 years ago by Kostas Apazidis (KonApaz), updated 5 years ago by Kostas Apazidis (KonApaz).

Everyone have seen a multilayer menu in several CMS

6 0
8 followers
Viewed: 20 753 times
Version: 1.1
Category: How-tos

model rules depended by user roles-permissions

Created 5 years ago by Kostas Apazidis (KonApaz), updated 5 years ago by Kostas Apazidis (KonApaz).

This is a reference about model validators and user roles. In many cases we want model validators to applied only for some privileged users or not

3 0
3 followers
Viewed: 14 412 times
Version: Unknown (update)
Category: How-tos

Single table inheritance

Created 8 years ago by samdark, updated 8 years ago by samdark.

Relational databases do not support inheritance so if we need to represent it, we have to somehow store meta info while keeping performance by minimizing JOINs. One way to solve this problem is using single table inheritance. All fields for the whole class tree are stored in a single table. Class name is stored in the type field...

34 0
36 followers
Viewed: 43 854 times
Version: 1.1
Category: How-tos

Reference: Model rules validation

Created 9 years ago by krillzip, updated 5 years ago by Rodrigo.

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.

97 0
115 followers
Viewed: 809 299 times
Version: 1.1
Category: How-tos