Wiki

Articles tagged with "model"X
Displaying 1-10 of 25 result(s).

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

Created 18 days ago by Wade ShulerHow-tos0 comments – viewed 1,259 times – version 2.0
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.

Active Record snapshotting (Model data base history)

Created about a year ago by BizleyTutorials3 comments – viewed 4,928 times – ( +2 ) – version 1.1
One of the common tasks the web application might be required to perform, especially the app using some kind of a CMS, is to save the history of data changes. Your client for sure will want the answer to this simple question - If I mess this up or delete by accident can we bring it back? Well, DB backup is one thing and quick recovery is another - let's talk about latter one.

Add model validator in Controller

Created about a year ago by Kostas Apazidis (KonApaz)Tips4 comments – viewed 12,814 times – ( +1 / -1 ) – version 1.1
There are cases that model validators should be depended by controller/action and you couldn't manipulate on the model class or using scenarios in easy way

Create Form With DynamicModel

Created about a year ago by Misbahul D MunirTips4 comments – viewed 9,328 times – ( +1 ) – version 2.0
In yii2 we can create form without create FormModel. Here we go
tags: form, yii2, model

Expert's model generation with Gii

Created 2 years ago by le_topTips0 comments – viewed 7,027 times – ( +3 ) – version 1.1
Efficient coding with Yii implies efficient use of the code generator. This article shares the personalised Gii templates that were built starting from the standard templates proposed by AweGen.

Sort and save order of model-elements drag & drop

Created 2 years ago by Kostas Apazidis (KonApaz)Tutorials2 comments – viewed 6,187 times – ( +2 ) – version 1.1
Suppose you have Products,Categories and each product belongs in many categories

Model validation for field ranges using yii2-field-range extension

Created 2 years ago by Kartik VTips0 comments – viewed 10,665 times – ( +39 ) – version 2.0
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.

Save or Update Multiple related model values in one Tabular input form

Created 2 years ago by Kostas Apazidis (KonApaz)Tutorials4 comments – viewed 16,452 times – ( +1 / -7 ) – version 1.1
In this wiki I will show you how to save/update a model with many related model For example: How to set a product to multiple categories only in one post form ?

Insert a model record using CGridview

Created 2 years ago by Kostas Apazidis (KonApaz)How-tos0 comments – viewed 8,076 times – ( +2 ) – version 1.1
CGridview displays existent rows of the table (using DataProvider)

Generate CTreeview from database table and update a model

Created 2 years ago by Kostas Apazidis (KonApaz)How-tos0 comments – viewed 5,168 times – ( +1 ) – version 1.1
Suppose we want to set a category to product (or an item in general term), Also suppose categories has sub-categories (multi-level)