Wiki

Articles in category "tips", sorted by date (updated)X
Displaying 1-10 of 123 result(s).

Update Gridview with Dropdown Selection

Updated 2 days ago by lgastmansTips0 comments – viewed 673 times – ( +1 ) – version 1.1
I recently worked on updating the content of a gridview based on the selection of a dropdown menu. I thought I should share it in the forum...

Debugging CActiveRecord failed save() attempts

Updated 9 days ago by BoazTips0 comments – viewed 6,418 times – ( +4 ) – version 1.1
When you're filling up a form of a CActiveRecord (using CActiveForm for example), usually you'll construct your code so that in case of validation error you'll get back the form with the error displayed back to you, typically when CActiveForm.errorSummary() is used. This is how its done by Gii.

An Easy Solution for Dependent dropDownList Using AJAX

Updated 9 days ago by KonApazTips10 comments – viewed 40,149 times – ( +11 / -1 ) – version 1.1
Sometimes new Yii guys face problem to manage dependent dropDownList using AJAX. I am going to discuss an easy solution about this issue.

Yiistrap TbHtml::navbarSearchForm

Updated 10 days ago by CeBeTips0 comments – viewed 3,376 times – version 1.1
Hi all,

CGridView customized CCheckBoxColumn

Updated 10 days ago by CeBeTips2 comments – viewed 2,205 times – ( +4 ) – version 1.1
Hi friends,

Auto-update denormalized attributes with MongoDb and Yii2

Updated 10 days ago by CeBeTips0 comments – viewed 1,624 times – version 2.0
You have different collections in MongoDb with de-normalized attributes. As you may know, due to its not-join nature, MongoDb tends to encourage repetition of the same value in different collections (de-normalization). In this MongoDb is opposed to a more SQL-like approach where you usually reference only the ID of the value with a foreign key.

Multiple Enviroments - Only with files

Updated 10 days ago by CeBeTips0 comments – viewed 1,561 times – ( -6 ) – version 1.1
The idea of ‚Äč‚Äčthis wiki is to show how to have a development environment .

Create thermometer using rgraph

Updated about a month ago by Ankit ModiTips2 comments – viewed 3,640 times – ( +3 )
Hi friends,

1:n relations sometimes require CDbCriteria.together

Updated 3 months ago by fsbTips4 comments – viewed 22,215 times – ( +16 ) – version 1.1
There are situations in which Active Record will generate nonsense queries from what a nieve Yii user might think is reasonable code. One such situation is a CActiveDataProvider using CDbCriteria to get data from parent and 1:n child table with a condition on the child table.

Adding a date range search for CGridView the easy way

Updated 5 months ago by mikewalenTips4 comments – viewed 12,968 times – ( +10 ) – version 1.1
After a lot of research, everything I found on adding date range searching to a CGridView advanced search form seemed to involve adding two new public variables (e.g. $date_from, $date_to), 'safe' rules for the new variables, and a rather chunky if/elseif/else check in the search() method. This probably isn't a hassle for most, but because many of the tables in my database contain two or three and sometimes four date columns (e.g. date_created, date_modified, date_deleted etc.), it meant I was having to add up to eight public variables, the corresponding safe rules, and modifying the search() criteria for each date attribute. So, I set about creating a better way and I thought I'd share my work with the community.