PHPackages                             ssimpson/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. ssimpson/yii2-dual-list-box

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

ssimpson/yii2-dual-list-box
===========================

Dual list box Widget for Yii 2

0211↓100%1JavaScript

Since Sep 20Pushed 7y ago1 watchersCompare

[ Source](https://github.com/SteveSimpson/yii2-dual-list-box)[ Packagist](https://packagist.org/packages/ssimpson/yii2-dual-list-box)[ RSS](/packages/ssimpson-yii2-dual-list-box/feed)WikiDiscussions master Synced 1mo ago

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 ssimpson/yii2-dual-list-box "dev-master"

```

or (if you have composer in your path)

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

```

or add

```
"ssimpson/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 ssimpson\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"
    },
    {
        "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

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75.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/42f3264beff59694f40a80f6bac665aa158e9f0736b69f1dfbd0500559c1de70?d=identicon)[ssimpson](/maintainers/ssimpson)

---

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)")[![ibrarturi](https://avatars.githubusercontent.com/u/3693201?v=4)](https://github.com/ibrarturi "ibrarturi (1 commits)")

### Embed Badge

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

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

PHPackages © 2026

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