1. Go to this page and download the library: Download pillum/yii2-dual-list-view 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/ */
pillum / yii2-dual-list-view example snippets
echo pillum\duallistview\Widget::widget([
'model' => $model,
'attribute' => 'list_regions',
'title' => 'города',
'data' => $region,
'data_id'=> 'id',
'data_value'=> 'name',
'data_value_extended'=> 'name_extended',
'lngOptions' => [
'warning_info' => 'Вы уверены, что хотите выбрать такое количество элементов?
Возможно Ваш браузер может перестанет отвечать на запросы..',
'search_placeholder' => 'Фильтр',
'showing' => ' - показано',
'available' => 'Имеющиеся',
'selected' => 'Выбранные'
]
]);
$model = new ModelForm;
$region = Region::find();
$model = new ModelForm;
$model->load(Yii::$app->request->post());
$region_model = Json::decode($model->list_regions);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.