PHP code example of philippfrenzel / yii2bsduallistbox

1. Go to this page and download the library: Download philippfrenzel/yii2bsduallistbox library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

philippfrenzel / yii2bsduallistbox example snippets

 

use net\frenzel\yii2bsduallistbox\yii2bsduallistbox;
...

    
    $options = [
        'multiple' => true,
        'size' => 20,
    ];

    // echo Html::listBox($name, $selection, $items, $options);
    echo yii2bsduallistbox::widget([
        'name' => $name,
        'selection' => $selection,
        'items' => $items,
        'options' => $options,
        'clientOptions' => [
            'moveOnSelect' => false,
            'selectedListLabel' => 'Selected Items',
            'nonSelectedListLabel' => 'Available Items',
        ],
    ]);

$ php composer.phar