Wiki

Articles in category "tips", sorted by ratingX
Displaying 71-80 of 134 result(s).

View a related field in CGridView

Created 2 months ago by Rafael J TorresTips1 comment – viewed 1,314 times – ( +4 ) – version 1.1
Generally we need to show one or more fields from a model that is related to another model used in CGridView. For our case we will use two related models, which explain how to use model "A" fields in a CGridView that used model "B".

adding class and links to Ctreeview node

Created 3 years ago by bingjie2680Tips2 comments – viewed 11,570 times – ( +4 ) – version 1.1
This article will show you how to add links and class to each node in ctreeview. so you can attach events in js by obtaining handler on anchor or class.
tags: ctreeview, link, class

Debugging CActiveRecord failed save() attempts

Created about a year ago by BoazTips0 comments – viewed 8,966 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.

Send asset folder path to a javascript of a widget

Created 2 years ago by sensorarioTips4 comments – viewed 16,005 times – ( +4 ) – version 1.1
When you develop a widget, you could need one image that is in the assets folder, you can use it simply within a css. You can load a css or javascript script doing this:

how to use github (un)official extension repo in your Yii project

Created 2 years ago by RusAlexTips4 comments – viewed 6,959 times – ( +4 ) – version 1.1
Using a git submodule command in your yii project

using multiple radio button

Created 2 years ago by francis jaTips4 comments – viewed 28,041 times – ( +6 / -1 ) – version 1.1
When we use multiple radio buttons with same name in Yii many people have the problem on getting the value of the selected radiobutton. The radioButtonList can be used for that, but if we need to use radioButton itself to place the button any where in a view, we need to include one more parameter in htmloption array().

Putting Function To Be Called In View

Created 3 years ago by junxiongTips2 comments – viewed 23,688 times – ( +6 / -1 ) – version 1.1
Sometimes we need some complicated view to be displayed (such as generating complicated table). Most people suggest that in MVC the View must be as simple as possible (don't have too much loops, etc). So what we have to do is to hide away the complex code by putting it at somewhere else. The following are few places options to keep the function:
tags: view, render

Useful Multilanguage extensions collection and use.

Created about a year ago by cihappyTips2 comments – viewed 4,145 times – ( +3 )
What I want to achieve:

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

Created about a year ago by Ankit ModiTips0 comments – viewed 7,177 times – ( +3 ) – version 1.1
Hi Friends,

Create thermometer using rgraph

Created about a year ago by Ankit ModiTips2 comments – viewed 4,234 times – ( +3 )
Hi friends,