Wiki articles

Showing 101-120 of 140 items.
Created 4 years ago by Kartik V, updated 4 years ago by toph.

FORM with GET method causes repeated stacking of URL Parameters

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

4 2
40 followers
Viewed: 41 162 times
Version: all
Category: Tips
Created 4 years ago by Kartik V, updated 4 years ago by Kartik V.

Displaying uploaded file from DB for update with FileInput widget

This is for folks who are using \kartik\widgets\FileInput to upload files from your client. How do you display an image for update after you have uploaded it to the server using the widget?

1 3
42 followers
Viewed: 45 143 times
Version: 2.0
Category: How-tos
Created 4 years ago by Anas AbuDayah, updated 3 years ago by Cozumel.

How to use imagine ( crop, thumb, effects for images ) on Yii2

Imagine adds most common image functions and also acts as a wrapper to Imagine image manipulation library.

5 0
13 followers
Viewed: 70 620 times
Version: 2.0
Category: Tutorials
Created 4 years ago by softark, updated 4 months ago by softark.

Drills : Search by a HAS_MANY relation in Yii 2.0

This article tries to describe the practical techniques of searching by a HAS_MANY relation using ActiveRecord of Yii 2.0.

11 0
12 followers
Viewed: 70 623 times
Version: 2.0
Category: Tutorials
Created 3 years ago by ajith, updated 3 years ago by ajith.

Simple Jui Autocomplete in yii2

To use jui auto complete widget first add

0 0
3 followers
Viewed: 29 912 times
Version: 2.0
Category: Tutorials
Created 3 years ago by softark, updated 10 months ago by softark.

How to create/update a model with its related items using Listbox or CheckboxList

Assume we have many categories and many posts.

3 0
6 followers
Viewed: 27 547 times
Version: 2.0
Category: Tutorials
Created 2 years ago by emrald, updated 2 years ago by emrald.

How to make bootstrap tabs remain active/selected after navigating to different web pages.

Bootstrap tabs gets unselected/inactive when user navigates to other page and comes back. How to make bootstrap tabs remain active/selected after navigating to different web pages.

1 0
3 followers
Viewed: 8 663 times
Version: 2.0
Category: Tutorials
Created 4 years ago by Kartik V, updated 3 years ago by Kartik V.

Using your own forked version of extensions with composer

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 followers
Viewed: 15 063 times
Version: 2.0
Category: Tutorials
Created 4 years ago by Kartik V, updated 4 years ago by Kartik V.

Managing a star rating with the StarRating widget in Yii 2

In Yii 1.x, there was a built in widget CStarRating based on the jquery star rating plugin. There exists no prebuilt solution in Yii2, however the same concepts can be extended using any jquery plugin.

1 3
41 followers
Viewed: 15 464 times
Version: 2.0
Category: How-tos
Created 7 months ago by Necip, updated 6 months ago by Necip.

An alternative way to ElasticSearch

This article is for those who have dealt with the complexity of Elasticsearch or any other indexing machines and are looking for an easier way to index the existing database without additional effort.

1 0
2 followers
Viewed: 5 771 times
Version: all
Category: How-tos
Created 4 years ago by ThePr0f3550r, updated a year ago by alrazi.

Creating a Dependent Dropdown From Scratch in Yii2

I have read http://www.yiiframework.com/wiki/24/creating-a-dependent-dropdown/ (Dependen Dropdown Yii1), but I can't implement it in Yii2 because Yii2 does not have built-in AJAX functionality hem.. I searched about it and came across this post

3 1
11 followers
Viewed: 96 367 times
Version: 2.0
Category: How-tos
Created 4 years ago by sirin k, updated a year ago by Maurizio Domba Cerin.

Write & use a custom Component in Yii2.0

This is a simple example in Yii2.0 to understand how you can write a custom component and use it inside your app.(basic template)

12 0
11 followers
Viewed: 92 854 times
Version: 2.0
Category: How-tos
Created 4 years ago by Antonio Ramirez, updated 3 years ago by deacs.

How to implement form events

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.

5 0
6 followers
Viewed: 24 710 times
Version: 2.0
Category: How-tos
Tags: Forms, How to, yii2
Created 4 months ago by samdark, updated 23 days ago by samdark.

Using multiple models in an identity

Let's assume we have two models: Customer and Supplier and we want both to log in. Yii is quite flexible when it comes to authentication and authorization so it's possible.

7 1
2 followers
Viewed: 9 625 times
Version: 2.0
Category: How-tos
Created 4 years ago by Misbahul D Munir, updated 4 years ago by Misbahul D Munir.

Create Form With DynamicModel

In yii2 we can create form without create FormModel. Here we go

2 0
7 followers
Viewed: 28 968 times
Version: 2.0
Category: Tips
Tags: form, model, yii2
Created 4 years ago by Scott_Huang, updated 4 years ago by Scott_Huang.

Step by step for how to full export Yii2 grid to excel

We will leverage Yii2-excelview widget. So, first of all is install Yii2-excelview:

0 0
5 followers
Viewed: 51 966 times
Version: 2.0
Category: Tips
Created 3 years ago by ezekielnoob, updated a month ago by samdark.

Simple way to implement Dynamic Tabular Inputs

grid

2 0
11 followers
Viewed: 28 134 times
Version: 2.0
Category: Tutorials
Created 3 years ago by skworden, updated 3 years ago by skworden.

Load data from internal/external source to fill form fields

This wiki is to show you how to use jQuery get and JSON to get data from a dropdown/any form field and fill form fields with the values instantaneously. First, I'll give example use cases of what I'm going to teach you so you can quickly see if this is for you.

1 0
5 followers
Viewed: 21 077 times
Version: 2.0
Category: How-tos
Created 2 years ago by schmunk, updated 2 years ago by samdark.

Boost composer-asset-plugin update speed

If you're using a lot of bower and npm assets with Yii 2.0 you might encounter long running composer update tasks.

6 0
6 followers
Viewed: 17 846 times
Version: 2.0
Category: Tips
Created 2 years ago by Sherin Jose, updated 2 years ago by Sherin Jose.

Installation guide: Yii-2 advanced template with RBAC system

Welcome, all of you !

7 1
19 followers
Viewed: 77 161 times
Version: 2.0
Category: Tutorials
Tags: install, rbac, yii2