This module provides a form element and widget for a visual on/off switch.
- Install this module and its dependencies using the official Backdrop CMS instructions
There are two ways to use the widget:
-
Field UI A widget is provided for checkbox (boolean) fields. When creating a boolean field, select
switch
as the widget. -
Form API The module defines a new form element type
switch
- use as you would a checkbox.
$form['example'] = array(
'#type' => 'switch',
'#title' => t('Example'),
);
Bugs and Feature requests should be reported in the Issue Queue
- Ported to Backdrop CMS by Laryn Kragt Bakker for Aten Design Group.
- Current maintainer for the Drupal module: Ben Scott.
This project is GPL v2 software. See the LICENSE.txt file in this directory for complete text.