Wiki

Sorted by date (updated)X
Displaying 141-150 of 702 result(s).

FORM with GET method causes repeated stacking of URL Parameters

Updated 5 months ago by tophTips2 comments – viewed 2,777 times – ( +30 / -4 ) – version all
You are using an ActiveForm in yii (both v1.x or 2), with a GET method like below:

Handling tabular data loading and validation in Yii 2

Updated 5 months ago by Kartik VTutorials0 comments – viewed 3,251 times – ( +29 / -4 ) – version 2.0
How do you read and handle tabular data submission via form in Yii framework 2.0? Sometimes we want to collect user input in a batch mode. That is, the user can enter the information for multiple model instances and submit them all at once. We call this tabular input because the input fields are often presented in an HTML table.

How to read HTML5 Multiple File Input from controller?

Updated 5 months ago by Kartik VHow-tos1 comment – viewed 1,801 times – ( +27 / -4 ) – version all
Ok, so you have a HTML 5 file input markup on your view and you have enabled multiple attribute to true. You may also be using widgets based on HTML5 input like \kartik\widgets\FileInput. But when you read a file in Yii controller using CUploadedFile (Yii1) or UploadedFile (Yii2), you do not see a list of multiple files that you selected in your view, but only one row. Your HTML markup in your view would be something like this and you don't know why this is not working?

Overcoming removal of client helpers (e.g. ajaxLink) and ClientScript in Yii 2.0

Updated 5 months ago by Kartik VFAQs1 comment – viewed 2,304 times – ( +30 / -4 ) – version 2.0
With Yii Framework 2.0, one of the many changes, that Yii 1.x developers will face is removal of all client helpers and revamp of the CClientScript functionality. For example no more CHtml::ajaxLink or Html::ajaxLink. How do you cater to such requirements in Yii 2.0?

What to do when composer fails to update your vendor packages?

Updated 5 months ago by Kartik VTutorials0 comments – viewed 1,520 times – ( +28 / -5 ) – version 2.0
Have you faced some of these problems when using composer with your Yii 2 installation?

Yii2 default values for Index data Provider

Updated 5 months ago by CTalaTips1 comment – viewed 1,756 times – ( +1 ) – version 2.0
Guys,

Open bootstrap modal and load content via Ajax

Updated 5 months ago by JbalTeroHow-tos1 comment – viewed 14,457 times – ( +2 ) – version 1.1
My goal here is to Open bootstrap modal and load ANY content using ajax response.

Get 'source' data from the database - for TbEditableColumn or EditableColumn ('type'=>'select' / dropdownlist)

Updated 5 months ago by Gerhard LiebenbergHow-tos0 comments – viewed 10,252 times – ( +4 / -1 ) – version 1.1
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.

i18n All-in-one format and timezone conversions for date, time, timestamp and datetime.

Updated 5 months ago by Gerhard LiebenbergHow-tos3 comments – viewed 11,441 times – ( +7 / -1 ) – version 1.1
Most of the currently available functions/extensions/behaviors directly or indirectly use timestamps to perform "format" and "timezone" conversions. This creates problems for dates falling outside the timestamp range; and the two forms of conversions must often be done in separate processes. However, by using php's DateTime class (instead of timestamps), we can do both conversions on a single DateTime object (only 2 lines of code) for date, time, timestamp and datetime types - while php takes care of nightmares such as daylight saving times and more importantly, historical changes in timezones and daylight saving times.

Advanced CGridview issues - custom button using php and html

Updated 5 months ago by KonApazHow-tos0 comments – viewed 2,673 times – ( +1 ) – version 1.1
This wiki shows about how to make a custom column or how to pass php-Yii-html code in CButtonColumn (as a button)