Provides an iphone-like switch form element & widget.
There are two ways to use it:
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 checkbox.
$form['example'] = array(
'#type' => 'switch',
'#title' => t('Example'),
); Development of this module was carried out by Ben Scott for the Scratchpads project.
Project information
- Project categories: Site structure, Developer tools
96 sites report using this module
- Created by ben_scott on , updated
Stable releases for this project are covered by the security advisory policy.
There are currently no supported stable releases.
