Articles in category "tips", sorted by commentsX
Displaying 91-100 of 135 result(s).


Created about a year ago by hiral darjiTips1 comment – viewed 5,259 times – ( +3 ) – version 1.1
If you have two datepicker in one form and you want that a date of from date shold be minimum date of todate then put following code in Cjuidatepicker widget options array:

Search scenario (CGridView, etc.): avoid default values from database as search condition.

Created 10 days ago by le_topTips1 comment – viewed 842 times – ( +1 ) – version 1.1
Yii has a neat "trick" that will assign default values to new CActiveRecords. When performing a search() though, this is pretty annoying as they automatically apply as filter values.

How to use a component before every action of a controller

Created about a year ago by transistorTips1 comment – viewed 15,785 times – ( +2 / -1 ) – version 1.1
I guess this is a tip on how to execute some code before every action in a controller, because I will tell you how I did it and maybe you can use the idea in your project.

Search a file size range in CGridView

Created about a year ago by CrazyCatTips0 comments – viewed 3,271 times – ( +2 )
Working on a report system of files transfert, I had to let the users simply find files by size. I didn't want to have two fields, I prefer a simple text input, with "human syntax".

Understanding series articles

Created 2 years ago by GOshaTips0 comments – viewed 7,743 times – ( +16 ) – version 1.1
Here are all wiki articles from "Understanding" series by Yii wiki contributors:

How to preload dropdowns in CForm

Created about a year ago by transistorTips0 comments – viewed 3,626 times – ( +1 )
So you want to use CForm (form builder), but need to preload dropdowns in a form? It's simpler than it seems. You got your CFormModel, CForm and the actual Form, right? Let's say you have the typical State -> City dependent dropdowns, so you would want to load the from with the State and City selected.

How to call a default layout for every module and how to work <php echo $content; ?>

Created 11 months ago by Ankit ModiTips0 comments – viewed 10,356 times – ( -1 )
Hi Friends, Hi Friends, Some common question is difficult to how to create the layout on yii and how to work

How to change the confirmation message on admingridview button and call a ajax..Dynamic

Created 11 months ago by Ankit ModiTips0 comments – viewed 6,752 times – ( +3 ) – version 1.1
Hi Friends,

Multi Data Provider

Created 9 months ago by Sharon LavieTips0 comments – viewed 5,078 times – ( +1 )
Lately, i needed to deal with the following scenario: read from two databases (db1,db2), and write to a third database (db3).

Set a menu - reusable code

Created 8 months ago by KonApazTips0 comments – viewed 3,493 times – ( +1 )
As we know Using crud generator creates menu items in view files (for each view file have a varius menu items)