PHP code example of zertex / yii2-zx-bootstrap-select

1. Go to this page and download the library: Download zertex/yii2-zx-bootstrap-select 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/ */

    

zertex / yii2-zx-bootstrap-select example snippets


<?= $form->field($model, 'field')->widget(Select::className(), [
    'selector' => '.select-picker',
    'options' => [
        'data-live-search' => 'true',
    ],
    'selectOptions' => [
        'style' => 'btn-default form-control',
        'data-live-search' => 'true',
        'width' => '100%',
    ],
    'items' => [
        '1' => 'Item 1',
        '2' => 'Item 2',
        '3' => 'Item 3',
        '4' => 'Item 4',
        '5' => 'Item 5',
    ]
]);