Wiki

Displaying 561-570 of 715 result(s).

Updating fields on a form with Ajax and Json

Created 3 years ago by Russell EnglandHow-tos4 comments – viewed 46,451 times – ( +12 / -1 ) – version 1.1
I'm developing a website that has an option to look up a car's registration number via SOAP and return additional details such as make, model, colour etc.

Avoiding rendering entire page when using CGridView and CListView via AJAX

Created 3 years ago by xrxHow-tos17 comments – viewed 33,428 times – ( +23 ) – version 1.1
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.

A simple action for CJuiAutoComplete

Created 3 years ago by tydeas_drTips9 comments – viewed 29,429 times – ( +16 / -1 ) – version 1.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?

Understanding "Safe" Validation Rules

Created 3 years ago by Steve FriedlFAQs11 comments – viewed 76,711 times – ( +91 / -1 ) – version 1.1
A common source of confusion among new Yii users is how the 'safe' validator works, how it works with other validators, and why it's necessary in the first place. This article means to clear up this confusion, as well as explain the notion of Massive Assignment.

CGridView and AjaxForm Connect

Created 3 years ago by PinkBrainPlanHow-tos2 comments – viewed 18,391 times – ( +1 ) – version 1.1
As I'm new to the framework (2 weeks) - I tried to build a functionallity I already use a lot in my old framework (PRADO). This means combining a GridView with a form. And this in one page, what allows you to select a record from the grid and view the values in the same page without jumping to a new page.
tags: Ajax, Form, CGridView

How to use Smarty renderer in Yii

Created 3 years ago by dongbetaHow-tos2 comments – viewed 16,751 times – ( +4 ) – version 1.1
At first, create a class named SmartyRenderer under application/components or any directory you want.
tags: smarty, renderer

Keeping a running total in a CGridView

Created 3 years ago by Steve FriedlHow-tos4 comments – viewed 23,109 times – ( +24 ) – version 1.1
This tip created in conjunction with IRC #yii channel users emilsedgh and tydeas - thanks!
tags: CGridView

URL component access functions

Created 3 years ago by Steve FriedlTips1 comment – viewed 10,690 times – ( +28 ) – version 1.1
Many applications wish to obtain parts of the URL for the current page (the hostname, the query string, etc.), and the CHttpRequest class wraps various $_SERVER variables to break down the URL into its constituent parts.
tags: URL, request

The directory structure of the Yii project site

Created 3 years ago by qiangOthers40 comments – viewed 120,806 times – ( +81 ) – version 1.1
In this article, we describe the directory structure used by yiiframework.com - the official Yii framework website. While this structure may look overly complicated for small projects or may not be optimal in some sense, we believe it is appropriate for medium or large projects in a team development environment. In fact, we have successfully used the similar structure in some other big projects.
tags: directory, config

Impersonate Users within Yii Framework

Created 3 years ago by WoilTutorials5 comments – viewed 12,917 times – ( +22 ) – version 1.1
For some applications it can be advantageous for administration reasons to allow site administrators to login as other users. This is sometimes called user impersonation or "becoming that user".