panix/wgt-bootstrap-select

Widget bootstrap select

dev-master 2021-02-01 10:57 UTC

This package is auto-updated.

Last update: 2024-04-29 04:03:17 UTC


README

Widget for PIXELION CMS 2.x to use bootstrap-select

Latest Stable Version Total Downloads Monthly Downloads Daily Downloads Latest Unstable Version License

Installation

The preferred way to install this extension is through composer.

Either run

php composer require --prefer-dist panix/wgt-bootstrap-select "*"

or add

"panix/wgt-bootstrap-select": "*"

to the require section of your composer.json file.

Usage

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

<?php
echo \panix\ext\bootstrapselect\BootstrapSelect::widget([
    'name' => 'items',
    'value' => [], //selected items
    'items' => $items,
    'options' => [
        'multiple' => true
    ],
    'jsOptions' => [
        /*...*/
    ]
]);
 ?>

Or ActiveRecord

<?php
echo $form->field($model, 'items')->widget('panix\ext\bootstrapselect\BootstrapSelect', [
    'items' => $items,
    'options' => [
        'multiple' => true
    ],
    'jsOptions' => [
        /*...*/
    ]
]);
?>