coderius/yii2-toggle-switcher-widget Yii 2 toggle-switcher-widget

widgetswitcher

Toggle switcher widget for Yii2

This widget will help to replace the checkbox in the form with a nice switch.

alt text alt text

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require "coderius/yii2-toggle-switcher-widget" "@dev"

or

composer require "coderius/yii2-toggle-switcher-widget" "@dev"

or add

"coderius/yii2-toggle-switcher-widget" : "@dev"

to the require section of your application's composer.json file.

Usage

How to basic use widget:

<?php 
    echo $form->field($model, 'flagActive')->widget(ToggleSwitchWidget::classname(), [
        'type' => ToggleSwitchWidget::CHECKBOX
    ]); 
?>

Or more short notice (ToggleSwitchWidget::CHECKBOX is default type value in widget):

<?= $form->field($model, 'status')->widget(ToggleSwitchWidget::classname()); ?>

Statistics

Downloads
GitHub Stars
GitHub Forks

Releases

Comments



1.0.0 is the latest of one release



MIT license
Stats
0 github stars & 0 github forks
0 downloads in the last day
0 downloads in the last 30 days
88 total downloads