maximkozhin/yii2-checkbox-serial

Checkboxes input widget for Yii2

Installs: 9

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:yii2-widget

pkg:composer/maximkozhin/yii2-checkbox-serial

1.0.0 2017-05-18 11:18 UTC

This package is not auto-updated.

Last update: 2025-12-21 08:20:10 UTC


README

Via composer

add to your 'require' section in file 'composer.json'

 "require": {
       ...
        "maximkozhin/yii2-checkbox-serial": "*"
    },

or run command

$ composer require maximkozhin/yii2-checkbox-serial

1. Usage | Использование

To create a Main checkbox

<?= \maximkozhin\checkboxserial\widgets\CheckboxSerial::widget([
    /**
     * Generating HTML code: 
     * <input type="checkbox" ... class="selector-class-for-main-checbox-input" id="id-for-main-checbox-input"
     */
    'id' => 'id-for-main-checbox-input',
    'selectorClass'=>'selector-class-for-main-checbox-input',
    
    /** 
     * Generating HTML code: 
     * <laber for="id-for-main-checbox-input">{{$label}}</label> 
     */
    'label'=>false  //or 'label'=>'Выбрать Все' or 'label'=>'Check All'
])?>

After Main Checbox you can add another chekboxes:

<?=Html::input('checkbox', 'id[]', $value, ['class'=>'selector-class-for-main-checbox-input'])?>