https://github.com/coderius/yii2-toggle-switcher-widget
https://github.com/coderius/yii2-toggle-switcher-widget
input switcher widget yii2
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/coderius/yii2-toggle-switcher-widget
- Owner: coderius
- License: other
- Created: 2018-09-06T14:47:16.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-09-06T15:47:45.000Z (almost 7 years ago)
- Last Synced: 2025-01-24T22:34:38.639Z (5 months ago)
- Topics: input, switcher, widget, yii2
- Language: PHP
- Size: 11.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
Toggle switcher widget for Yii2
===============================This widget will help to replace the checkbox in the form with a nice switch.

Installation
------------
The preferred way to install this extension is through [composer](http://getcomposer.org/download/).Either run
```
php composer.phar require "coderius/yii2-toggle-switcher-widget" "@dev"
```
or```
composer require "coderius/yii2-toggle-switcher-widget" "@dev"
```or add
```json
"coderius/yii2-toggle-switcher-widget" : "@dev"
```to the require section of your application's `composer.json` file.
Usage
-----
How to basic use widget:```php
field($model, 'flagActive')->widget(ToggleSwitchWidget::classname(), [
'type' => ToggleSwitchWidget::CHECKBOX
]);
?>```
Or more short notice (ToggleSwitchWidget::CHECKBOX is default type value in widget):```php
= $form->field($model, 'status')->widget(ToggleSwitchWidget::classname()); ?>
```