Wiki

Articles in category "how-tos", sorted by ratingX
Displaying 141-150 of 342 result(s).

Update CGridview row separately using ajax request

Created about a year ago by Kostas Apazidis (KonApaz)How-tos9 comments – viewed 9,748 times – ( +6 ) – version 1.1
There are cases you want to update a record on CGridview directly

Yii2 and Pdf files with Mpdf

Created about a year ago by CTalaHow-tos2 comments – viewed 7,884 times – ( +6 ) – version 2.0
I am still new to composer and packagist, so I want to share how I am creating the pdf files because for me was not as simple as it should be.

How to implement an event and attach it in a behavior

Created 2 years ago by seb7How-tos0 comments – viewed 13,558 times – ( +6 ) – 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 11 months ago by Antonio RamirezHow-tos4 comments – viewed 6,147 times – ( +6 ) – 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 2 years ago by le_topHow-tos0 comments – viewed 17,524 times – ( +6 ) – version 1.1
Getting "Expired token" errors ? Here is a solution to avoid invalid CSRF on POST or ajax requests, or user identity changes.

Yii2: Configuring different sessions for backend and frontend in Yii Advanced Application Template

Created 10 months ago by hrnairHow-tos2 comments – viewed 10,145 times – ( +6 ) – version 2.0
This is as an extension of this wiki by Kartik V which shows to make different enableAutoLogin cookies for frontend and backend.

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

Created 3 years ago by kiran sharmaHow-tos21 comments – viewed 40,893 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.

Storing your images in your table's blob field and displaying that stored images.

Created 3 years ago by sirin kHow-tos7 comments – viewed 26,634 times – ( +9 / -1 ) – version 1.1
He im giving you a very simple example ie how you can store an image to your blob field in a table.Hope you already familiar with the normal image upload.
tags: blob, image

Using a CDbDataReader (sql query result) in a zii widget (such as CGridView or CListView)

Created 4 years ago by Revelis Luc BonninHow-tos2 comments – viewed 23,974 times – ( +9 / -1 ) – version 1.1
If in your application you have to proceed to a complex SQL query that is not associated to a model, you will use CDbDataReader like it is described in the Yii documentation. An example could be

Show captcha after <N> unsuccessfull attempts

Created 3 years ago by zitterHow-tos7 comments – viewed 17,137 times – ( +15 / -4 ) – version 1.1
In this mini howto I would like to show how to add a required captcha field in the login form, after a defined number of unsuccessfull attempts. To do this, I will use the blog demo that you have in default Yii download package (path/to/yii/demos/blog).