Wiki

Sorted by viewsX
Displaying 131-140 of 470 result(s).

Update two models with one view

Created about a year ago by sensorarioTips10 comments – viewed 18,662 times – ( +10 / -2 )
Suppose to have two models: Users and Emails. You do not want to store email in a Users model. And User can have 0 or many emails. This is the form generated to create a new user (just username).
tags: database, model, view, form

How to use a Widget as an Action Provider

Created 2 years ago by Antonio RamirezHow-tos8 comments – viewed 18,340 times – ( +22 )
As written on the API docs: An Action Provider Widget is a widget that has declared several actions by using its 'public static function actions()'. After, a Controller can easily import all its declared actions on its 'public function actions()'.
tags: Widgets, CAction

Adding login form to each page

Created 3 years ago by pestaaTutorials5 comments – viewed 18,165 times – ( +3 / -1 )
After adding proper form to the main layout, like:

Using Yii with Oracle through PDO

Created 2 years ago by TrejderTips3 comments – viewed 18,144 times – ( +1 )
When you are developing an webapp with Yii that will be using Oracle RDBMS you should take a look at these issues in which you may run into it.

javascript + tabular input

Created 2 years ago by zaccariaHow-tos1 comment – viewed 17,929 times – ( +11 )
If you tried this extension with success, maybe you thought how to do it without page submission or ajax calls.

A simple action for CJuiAutoComplete

Created 2 years ago by tydeas_drTips7 comments – viewed 17,838 times – ( +14 / -1 )
More or less I use auto-complete field for a form. CJuiAutoComplete is a yii widget for this purposes. The common use case is to make an ajax request and retrieve a list from the database. So in this case you have to write a controller action to return you a json encoded list. What if I had a generic action to do this work for me?

How to validate CSRF token with session

Created about a year ago by yangmlsHow-tos0 comments – viewed 17,706 times – ( +17 )
First of all, You must change component config to enable the default Yii CSRF validation.
tags: CSRF, session

Filter / Search with CListView

Created about a year ago by JohnPollardHow-tos5 comments – viewed 17,691 times – ( +21 )
This is what I did. Its the EASIEST solution that I know of. I just reused the advanced search done in CGridView.

Quick Tip about Pagination Params

Created 2 years ago by Antonio RamirezTips2 comments – viewed 17,512 times – ( +5 )
Developing custom Grids and ListViews for my new CMS I was facing a small challenge: If I was to update/delete/batch delete items of my Grid, how would I return to the current page view?
tags: Pagination