rootlocal/yii2-select2

Yii2 Select2 widget

Installs: 27

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 3

Forks: 0

Open Issues: 0

Language:Sass

Type:yii2-extension

v1.0.4 2024-04-08 00:04 UTC

This package is auto-updated.

Last update: 2024-11-08 01:18:22 UTC


README

Yii2 Select2 widget

Latest Stable Version

Install

composer require rootlocal/yii2-select2

or add

"rootlocal/yii2-select2": "dev-master"

to the require section of your composer.json.

Basic usage:

<?php
use yii\web\View;
use yii\bootstrap4\ActiveForm;
use rootlocal\widgets\select2\Select2Widget;

/**
 * @var View $this
 * @var ActiveForm $form 
 */
?>

<?= $form->field($model, 'attribute')->widget(Select2Widget::class,['items'=> $model->getItems()]) ?>