Suppose we want to set a category to product (or an item in general term), Also suppose categories has sub-categories (multi-level)
Suppose we want to set a category to product (or an item in general term), Also suppose categories has sub-categories (multi-level)
Everyone have seen a multilayer menu in several CMS
Do you want to make a listbox or dropdownlist to select one or more categories or sub categories ?
hello guys now i am going to show you how to Reuse File Upload Code across multiple projects.
// In Yii 1.x $form = $this->beginWidget('CActiveForm', [
'id' => 'order-search-form',
'method' => 'get',
]);
echo $form->textInput($searchModel, 'id');
echo CHtml::submitButton('Find', ['class' => 'btn btn-primary']);
$this->endWidget();
`
My goal here is to Open bootstrap modal and load ANY content using ajax response.
If you want to edit data directly in the gridview in a 'dropdownlist' style, then you could use the 'type' => 'select' option of TbEditableColumn (YiiBooster) or EditableColumn (x-editable for Yii). This wiki shows how to get data from the db for the 'dropdownlist', by converting AR model data into an array that is passed in json format.
This wiki shows about how to make a custom column or how to pass php-Yii-html code in CButtonColumn (as a button)
There are cases you want to update a record on CGridview directly
In this article i will explain how to customize log activity in database, Imaging you need to save IP user, Url request and user_name in database,But table created by default with Yii only have id,level,category,logtime and message
For best experience,use Chrome.Other browsers may complain here and there.Sorry,no patience to make happy every freaking browser out there!
The classic Yii way for doing an update action is as follows:
I would like to share my little experience with Yii to the community in the form of the below small wiki:
Hey guys, today we will show you how to make a Yii CJuitabs as example. Some feature cases such as Static tabs, render partial tabs, Ajax tabs, color tabs... You can see our code, there are simple 3 steps to make it work.
typical scenario: invoice, invoice items.
I recently worked on updating the content of a gridview based on the selection of a dropdown menu. I thought I should share it in the forum...
Here is my solution to login with email or anything else This update works with database mysql You must generate the user model with GII
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.
Sometimes new Yii guys face problem to manage dependent dropDownList using AJAX. I am going to discuss an easy solution about this issue.