Wiki

Articles in category "how-tos", sorted by viewsX
Displaying 31-40 of 182 result(s).

Using setFlash for displaying various kind of messages

Created 2 years ago by TrejderHow-tos6 comments – viewed 22,463 times – ( +4 / -4 )
In this short how-to I will show how to customize setFlash() to display messages (flashes) styled to be success confirmation, error report or notice information. And how to achieve displaying errors in other way.
tags: flash, error, message

Avoiding rendering entire page when using CGridView and CListView via AJAX

Created 2 years ago by xrxHow-tos13 comments – viewed 22,264 times – ( +20 )
Since I used CGridView for a first time, I didn't like how it handled operations like sorting, filtering, changing page and etc using AJAX.

Custom Autocomplete Display and Value Submission

Created about a year ago by Antonio RamirezHow-tos5 comments – viewed 21,445 times – ( +12 / -1 )
How many of us has wondered how to create an autocomplete that will display the names of a related models but do require the id of that selected name to be submitted for model creation/update?

How to create front and admin side login form

Created 10 months ago by vibhaJadwaniHow-tos6 comments – viewed 21,252 times – ( +4 )
In this WIKI you can learn how to create front and admin login form, using database.

File uploads in CForm (Form builder)

Created about a year ago by Luke JurgsHow-tos2 comments – viewed 20,954 times – ( +8 )
While there is a reasonable amount of documentation regarding CForm (form builder) and file uploads seperately, there really is not any coverage of both in combination.

Using the jqueryslidemenu plugin with CMenu

Created 2 years ago by Antonio RamirezHow-tos0 comments – viewed 20,670 times – ( +18 / -1 )
Yii makes it really easy for all to use their already made objects that automate everything we do. It provides also great power of flexibility and styling but hey, we programmers tend to complicate our lives and push a little more the power of our tools.

How to write a simple application component

Created 2 years ago by zaccariaHow-tos4 comments – viewed 20,061 times – ( +12 / -7 )
An application component is a confortable way for share information among all component of the application

How to avoid multiple Ajax Request

Created 2 years ago by nickcvHow-tos12 comments – viewed 19,328 times – ( +14 )
CHtml::ajaxLink(), CHtml::ajaxSubmitButton() and similar methods are great, but if they are located inside a portion of the page that is already loaded via ajax something bad will happen, something you may even not notice if you are not using tools like firebugs: the sent ajax requests will multiply themselves.

Using International Dates

Created 2 years ago by Russell EnglandHow-tos3 comments – viewed 19,049 times – ( +16 )
I needed British (dd/mm/yyyy) formatted dates throughout my application but found it very difficult to find examples of how to do this - until I found this excellent forum post http://www.yiiframework.com/forum/index.php?/topic/3649-dealing-with-i18n-date-formats/

How to show ajax delete status in CGridView like flash messages

Created about a year ago by hasanaviHow-tos9 comments – viewed 18,669 times – ( +16 )
I've seen many tickets regarding how to show friendly delete confirmation using CGridView's CButtonColumn in ajax request. If you are using relational database, after producing CRUD functionality when you try to delete a record in ajax mode which has child record it can't be deleted and you can see the ajax loader forever. By this way you can't show the users if a record has been successfully deleted or if there are some problem in flash style (setFlash() / getFlash())