smukm/yii2-bitwise-checkboxlist

Bitwise checkbox`s list for Yii2

Installs: 28

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 2

Type:yii2-extension

pkg:composer/smukm/yii2-bitwise-checkboxlist

v1.0.4 2021-02-08 16:51 UTC

This package is auto-updated.

Last update: 2025-10-09 03:06:29 UTC


README

Installation

Install extension through composer:

composer require smukm/yii2-bitwise-checkboxlist

Usage

The following code in a view file would render a group of checkboxes:

<?= smukm\bcl\BitwiseCheckboxList::widget([
    'name' => 'attributeName',
    'data' => ['1' => 'New', '2' => 'Paid', '4' => 'Delivered', '8' => 'Complete'],
    'columns' => 2,
]) ?>

If you want to use this input widget in an ActiveForm, it can be done like this:

<?= $form->field($model, 'attributeName')->widget(smukm\bcl\BitwiseCheckboxList::class, [
    'data' => ['1' => 'New', '2' => 'Paid', '4' => 'Delivered', '8' => 'Complete'],
]) ?>