Wiki

Sorted by ratingX
Displaying 371-380 of 784 result(s).

View a related field in CGridView

Created 3 years ago by rafaelt88Tips1 comment – viewed 11,286 times – ( +6 / -1 ) – version 1.1
Generally we need to show one or more fields from a model that is related to another model used in CGridView. For our case we will use two related models, which explain how to use model "A" fields in a CGridView that used model "B".

Multilanguage web site controlling by get request and database allowed languages

Created 6 years ago by Igor IvanovicTutorials2 comments – viewed 22,105 times – ( +6 / -1 ) – version 1.1
First, you have to have create database table for default language and allowed languages.

How to implement an event and attach it in a behavior

Created 4 years ago by seb7How-tos0 comments – viewed 18,352 times – ( +6 / -1 ) – version 1.1
This page explains how to implement an event and catch that event in a behavior.
tags: event, behavior

How to implement form events

Created 2 years ago by Antonio RamirezHow-tos4 comments – viewed 18,217 times – ( +6 / -1 ) – version 2.0
You have that, when a product is on development they can change its API anytime. This change is quite important though, its related on how to set the events of your form, for example, the useful beforeSubmit.
tags: yii2, forms, how to

Checking for "expired" sessions/logins on the client side

Created 4 years ago by le_topHow-tos0 comments – viewed 23,801 times – ( +6 / -1 ) – version 1.1
Getting "Expired token" errors ? Here is a solution to avoid invalid CSRF on POST or ajax requests, or user identity changes.

Installing and configuring the Yii User Management Module under a fresh skeleton application generated by yiic

Created 7 years ago by thyseusTutorials5 comments – viewed 73,073 times – ( +12 / -5 ) – version 1.1
p.s. latest version of this tutorial is always available unter the docs/ folder of the User Management Module.

Saving files to a blob field in the database

Created 6 years ago by zaccariaTips8 comments – viewed 57,952 times – ( +9 / -3 ) – version 1.1
As a follow-up from the How to upload a file using a model wiki entry that explains how to save a file to the filesystem, this article will do the same using a blob field in the database.
tags: File upload

Ajax form submiting in Yii

Created 4 years ago by sirin kTutorials8 comments – viewed 132,684 times – ( +13 / -6 ) – version 1.1
hi guys, Here I'm going to give you a working example of ajax form submiting in Yii.

get summary of related model via STAT relation

Created 3 years ago by rootbearHow-tos2 comments – viewed 17,014 times – ( +7 / -2 ) – version 1.1
typical scenario: invoice, invoice items.

How to "masquerade" a non-required form element as 'required' one (in the view only)

Created 4 years ago by BoazHow-tos2 comments – viewed 15,356 times – ( +7 / -2 ) – version 1.1
In a nutshell, the task at hand is to mark (or render) a model attribute in the typical "_form.php" view file with the 'required' red asterisk while this attribute is not marked as required in the model's rule() method. If you're interested only in the solution, jump ahead to the 'solution' section below.