panix / wgt-bootstrap-select
Widget bootstrap select
Installs: 205
Dependents: 3
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:pixelion-component
Requires
This package is auto-updated.
Last update: 2024-10-29 05:22:56 UTC
README
Widget for PIXELION CMS 2.x to use bootstrap-select
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' => [ /*...*/ ] ]); ?>