Showing 201-220 of 826 items.

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

Created 12 years ago by Kartik V Kartik V, updated 11 years ago by Kartik V Kartik V. 12 comments

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.

0 0
51
Viewed: 185 933 times
Version: 2.0
Category: How-tos

Managing your nested dropdown dependency with DepDrop widget

Created 12 years ago by Kartik V Kartik V, updated 12 years ago by Kartik V Kartik V. 6 comments

If you are coming over to Yii 2 from Yii 1.x, you may have already read this useful wiki for creating dependent dropdowns. You can use a similar approach in Yii 2 to do the same. But if you are looking at a prebuilt solution that helps you manage it easier, read along.

2 3
42
Viewed: 102 063 times
Version: 2.0
Category: Tutorials

Using your own forked version of extensions with composer

Created 12 years ago by Kartik V Kartik V, updated 11 years ago by Kartik V Kartik V. 4 comments

So you want to use a fork of any existing vendor extension with your Yii 2 install and use the fork, instead of original source. This does not need you to push any update or register your package on packagist.org. You are recommended to follow the approach below:

3 2
40
Viewed: 27 987 times
Version: 2.0
Category: Tutorials

Install specific Yii2 vendor extension & dependency without updating other packages.

Created 12 years ago by Kartik V Kartik V, updated 12 years ago by Kartik V Kartik V. 0 comments

The tips here are for advanced usages of composer and its assumed you have read about using composer and have a knowledge of your vendor packages to be updated. Let's consider, you want to update only one specific yii2 vendor library, without updating all the other extension packages?

2 3
39
Viewed: 49 351 times
Version: 2.0
Category: Tips

Locking your Yii 2 project package versions with composer.lock

Created 12 years ago by Kartik V Kartik V, updated 12 years ago by Kartik V Kartik V. 0 comments

Ok, you have installed a Yii 2 basic or advanced app for the first time and completed the post install steps. You have picked up a few extensions to install for the first time as well. You would already see a composer.lock file in your application root folder.

0 2
37
Viewed: 21 821 times
Version: 2.0
Category: Tips

FORM with GET method causes repeated stacking of URL Parameters

Created 12 years ago by Kartik V Kartik V, updated 12 years ago by toph toph. 3 comments

// 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(); `

7 2
41
Viewed: 68 750 times
Version: all
Category: Tips