Articles in category "how-tos", sorted by viewsX
Displaying 41-50 of 348 result(s).

How to use single form to collect data for two or more models (CActiveForm and Ajax Validation edition)

Created 4 years ago by RusAlexHow-tos9 comments – viewed 48,117 times – ( +22 ) – version 1.1
With Yii you can use one CActiveForm for collecting data for two or more models with ajax validation and client validation.

CKEditor Integration (includes steps for file uploads) - Step by Step

Created 2 years ago by shulmeHow-tos12 comments – viewed 46,274 times – ( +26 ) – version 1.1
Hey guys, I'm hoping other people will find this helpful. Today I went through the process of adding CKEditor to one of my projects, and then integrating KCFinder as the image uploader. It will be used in a CActiveForm, without the use of any crazy weird widgets. All paths are relative, using Yii functions, so this will work no matter where you install. Here it is:

Create custom button button with AJAX function in CGridView

Created 3 years ago by nkdHow-tos2 comments – viewed 45,517 times – ( +19 ) – version 1.1
CButtonColumn in CGridView can be customised to include user built buttons. To learn a great deal about including custom buttons, read this excellent wiki. This tutorial will show how to call an action from one custom button using AJAX instead of regular GET calls.

Displaying, Sorting and Filtering Model Relations on a GridView

Created about a year ago by Antonio RamirezHow-tos5 comments – viewed 45,311 times – ( +29 / -1 ) – version 2.0
One of the things you will find tricky to implement is the the sorting and filtering of a GridView's column that displays related model data.

Moving project code outside of webroot (plus multiple project support)

Created 4 years ago by Steve FriedlHow-tos8 comments – viewed 45,182 times – ( +22 / -1 ) – version 1.1
Yii's by-default directory organization works well enough, but there are several steps one can take that improve the security and serviceability of the system, especially in the context of multiple Yii projects on the same machine (including multiple versions of the same project).
tags: config, security

Integrating Wordpress and Yii: still another approach, using Yii as the router/controller

Created 3 years ago by acorncomHow-tos23 comments – viewed 44,357 times – ( +22 ) – version 1.1
A lot of people have written posts on integrating Yii and WordPress. This article combines goncin's approach with an article I read about integrating Symfony and WordPress and applies it all to Yii and WordPress.

Save and Display Date/Time Fields in different formats in Yii2

Created about a year ago by Kartik VHow-tos10 comments – viewed 43,533 times – ( +37 ) – version 2.0
You would find having such a need in most Yii Projects. Your database needs a specific format to store date fields, while you may want to display it in different formats to the users on forms and other views.

How to use Multiple instances of the same model in the same form

Created 3 years ago by kiran sharmaHow-tos21 comments – viewed 43,470 times – ( +22 / -6 ) – version 1.1
When i had created this functionality then i found some difficulties and not got much idea from wiki and forums. so, i think this will be useful for newbie users and save time of other developers when create related functionality. I refer Collecting Tabular Input tutorial but not got clear idea for create/update.

How to validate CSRF token with session

Created 4 years ago by yangmlsHow-tos1 comment – viewed 43,441 times – ( +22 ) – version 1.1
First of all, You must change component config to enable the default Yii CSRF validation.
tags: CSRF, session

Reliable Alternative For Yii::app()->request->isAjaxRequest AND Adding Data To Ajax Form With JS

Created 4 years ago by ibo_sHow-tos2 comments – viewed 42,851 times – ( +15 / -1 ) – version 1.1
In this How-To I'll show you: