PHPackages                             softark/yii2-dual-listbox - 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. softark/yii2-dual-listbox

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

softark/yii2-dual-listbox
=========================

Bootstrap Dual Listbox Widget for Yii 2

v1.0.2(3y ago)20144.4k↓12.6%10[1 issues](https://github.com/softark/yii2-dual-listbox/issues)11BSD-3-ClausePHP

Since Jan 12Pushed 3y ago4 watchersCompare

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

READMEChangelogDependencies (2)Versions (4)Used By (11)

yii2-dual-listbox
=================

[](#yii2-dual-listbox)

Dual Listboxt for Yii framework 2.0.

Description
-----------

[](#description)

**softark\\duallistbox\\DualListbox** widget is a Yii 2 wrapper for [Bootstrap Dual Listbox](https://github.com/istvan-ujjmeszaros/bootstrap-duallistbox).

It works with bootstrap 3, 4, or 5

Requirements
------------

[](#requirements)

- Yii Version 2.0.0 or later
- yii2-bootstrap, yii2-bootstrap4 or yii2-bootstrap5
- istvan-ujjmeszaros/bootstrap-duallistbox v.3.0.x or v.4.0.x

Usage
-----

[](#usage)

1. Add `softark/yii2-dual-listbox` and `istvan-ujjmeszaros/bootstrap-duallistbox` in your project's `composer.json`, and let Composer configure your project.

    - You have to use a different version of `istvan-ujjmeszaros/bootstrap-duallistbox` depending on the bootstrap version.
    - For bootstrap 3, use `~3.0.0` :

    ```
    "require": {
        "php": ">=7.0.0",
        "yiisoft/yii2": "*",
        "yiisoft/yii2-bootstrap": "*",
        "istvan-ujjmeszaros/bootstrap-duallistbox": "~3.0.0",
        "softark/yii2-dual-listbox": "dev-master"
    },
    ```

    - For bootstrap 4 and 5, use `~4.0.0`:

    ```
    "require": {
        "php": ">=7.0.0",
        "yiisoft/yii2": "*",
        "yiisoft/yii2-bootstrap4": "*", // OR
        "yiisoft/yii2-bootstrap5": "*",
        "istvan-ujjmeszaros/bootstrap-duallistbox": "~4.0.0",
        "softark/yii2-dual-listbox": "dev-master"
    },
    ```
2. Use `softark\duallistbox\DualListbox::widget()` in place of `yii\helpers\Html::listBox()`, `yii\helpers\Html::activeListBox()`, or `yii\widgets\ActiveField::listBox()` in your view.

    1. Replacing **Html::listBox()** using **name and selection**

        ```
        use softark\duallistbox\DualListbox;
        ...
