Recommended releases

Download Released

This module provides a form element and widget for a visual on/off switch.


Configuration and Usage

There are two ways to use the widget:

  1. Field UI
    A widget is provided for checkbox (boolean) fields. When creating a boolean
    field, select switch as the widget.

  2. Form API
    The module defines a new form element type switch - use as you would a

$form['example'] = array(
'#type' => 'switch',
'#title' => t('Example'),


Bugs and Feature requests should be reported in the Issue Queue

Current Maintainers



This project is GPL v2 software. See the LICENSE.txt
file in this directory for complete text.