PHPackages                             esubach/yii2-dual-list-box - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. esubach/yii2-dual-list-box

ActiveYii2-extension

esubach/yii2-dual-list-box
==========================

Dual list box Widget for Yii 2

01.6kJavaScript

Since Feb 26Pushed 5y agoCompare

[ Source](https://github.com/ericsubach/yii2-dual-list-box)[ Packagist](https://packagist.org/packages/esubach/yii2-dual-list-box)[ RSS](/packages/esubach-yii2-dual-list-box/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Dual list box Widget for Yii 2
==============================

[](#dual-list-box-widget-for-yii-2)

`Dual list box Widget` is a wrapper for Dual List Box plugin for jQuery and Bootstrap, Bootstrap Dual List Box is a dual list box implementation especially designed for Bootstrap and jQuery. This control is quite easy for users to understand and use. Also it is possible to work with very large multi-selects without confusing the user.

This version differes from the parent in that it works with json data pulls. Both the php/yii wrapper and the actual Javascript have been updated to get this working.

The MIT License (MIT)

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist esubach/yii2-dual-list-box "dev-master"

```

or (if you have composer in your path)

```
composer require --prefer-dist esubach/yii2-dual-list-box "dev-master"

```

or add

```
"esubach/yii2-dual-list-box": "dev-master"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

Once the extension is installed, simply use it in your code:

EXAMPLE
-------

[](#example)

### View

[](#view)

```
echo esubach\duallistbox\Widget::widget([
    'model' => $model,
    'attribute' => 'list_regions',
    'title' => 'Example Title',
    'data' => $region,
    'data_id'=> 'id',
    'data_value'=> 'name',
    'json_uri' => 'http://example.com/data',
    'lngOptions' => [
        'warning_info' => 'Are you sure you want to move this many items? Doing so can cause your browser to become unresponsive.',
        'search_placeholder' => 'Filter',
        'showing' => ' - showing',
        'available' => 'Available',
        'selected' => 'Selected'
    ]
  ]);
```

model - model for form attribute - model attribute for form title - view name for attribute

data - model (Region::find()-&gt;all()) OR array\['id'=&gt;1,'name'=&gt;''\]; **This is a change from the upstream project.**data\_id - name attribute for id data\_value - name attribute for value

#### sample json data

[](#sample-json-data)

```

[
    {
        "index": 0,
        "name": "Peters Sloan",
        "company": "Kongle",
        "email": "peterssloan@kongle.com",
        "selected": true
    },
    {
        "index": 1,
        "name": "Bailey Hoffman",
        "company": "Centrexin",
        "email": "baileyhoffman@centrexin.com",
        "visuals": "red"
    },
    {
        "index": 2,
        "name": "Christine Hahn",
        "company": "Geoform",
        "email": "christinehahn@geoform.com",
        "selected": false
    }
]

```

in this example, only Peters Sloan would be selected by default

#### To refresh the data or use a different data source

[](#to-refresh-the-data-or-use-a-different-data-source)

```
    $('#list_regions').update({
        uri: 'http://example.com/data2',
    });

```

### Controller VIEW

[](#controller-view)

```
        $model = new ModelForm;

        $region = Region::find()->all();
```

### Controller SAVE

[](#controller-save)

```
$model = new ModelForm;
$model->load(Yii::$app->request->post());
$region_model = Json::decode($model->list_regions);
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity30

Early-stage or recently created project

 Bus Factor1

Top contributor holds 73.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/474c84e8b778927e08372e9550831b21e85eabca5908b37ab9d2363ed4bcae82?d=identicon)[esubach](/maintainers/esubach)

---

Top Contributors

[![maksyutin](https://avatars.githubusercontent.com/u/1647071?v=4)](https://github.com/maksyutin "maksyutin (28 commits)")[![drsdre](https://avatars.githubusercontent.com/u/809827?v=4)](https://github.com/drsdre "drsdre (8 commits)")[![ericsubach](https://avatars.githubusercontent.com/u/603930?v=4)](https://github.com/ericsubach "ericsubach (1 commits)")[![ibrarturi](https://avatars.githubusercontent.com/u/3693201?v=4)](https://github.com/ibrarturi "ibrarturi (1 commits)")

### Embed Badge

![Health badge](/badges/esubach-yii2-dual-list-box/health.svg)

```
[![Health](https://phpackages.com/badges/esubach-yii2-dual-list-box/health.svg)](https://phpackages.com/packages/esubach-yii2-dual-list-box)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
