PHPackages                             antons/switchfield - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. antons/switchfield

ActiveSilverstripe-module[Utility &amp; Helpers](/categories/utility)

antons/switchfield
==================

A simple iOS switch alternative for the CheckboxField in SilverStripe

0.2(10y ago)23601MITPHP

Since Feb 18Pushed 10y ago1 watchersCompare

[ Source](https://github.com/antons-/switchfield)[ Packagist](https://packagist.org/packages/antons/switchfield)[ Docs](https://github.com/antons-/switchfield)[ RSS](/packages/antons-switchfield/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

SilverStripe SwitchField
========================

[](#silverstripe-switchfield)

A simple iOS switch alternative for the CheckboxField in SilverStripe

[![](images/screenshot.jpg)](images/screenshot.jpg)

Usage
-----

[](#usage)

```
class MyDataObject extends DataObject {

	private static $db = array(
		'Switch' => 'Boolean'
	);

	public function getCMSFields() {
		$fields = parent::getCMSFields();

		// Create the SwitchField
		$switch = SwitchField::create('Switch', 'Switch', $this->Switch);

		$fields->addFieldToTab('Root.Main', $switch);

		return $fields;
	}

}

```

Attribution
-----------

[](#attribution)

This module is powered by the Switchery library built by Alexander Petkov

License
-------

[](#license)

Copyright (c) 2016, Anton Smith

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~36 days

Total

2

Last Release

3751d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/034f4e16b7689f483608f2832435339096b86bedbb5bad8295180bbfd7685282?d=identicon)[antons-](/maintainers/antons-)

---

Top Contributors

[![micschk](https://avatars.githubusercontent.com/u/1005986?v=4)](https://github.com/micschk "micschk (2 commits)")

---

Tags

silverstripetoggleswitchcheckboxtogglefieldcheckboxfield

### Embed Badge

![Health badge](/badges/antons-switchfield/health.svg)

```
[![Health](https://phpackages.com/badges/antons-switchfield/health.svg)](https://phpackages.com/packages/antons-switchfield)
```

###  Alternatives

[qandidate/toggle

Feature toggling for your PHP application.

3812.1M9](/packages/qandidate-toggle)[silverstripe/userforms

UserForms enables CMS users to create dynamic forms via a drag and drop interface and without getting involved in any PHP code

1371.1M85](/packages/silverstripe-userforms)[symbiote/silverstripe-gridfieldextensions

A collection of useful grid field components

951.9M270](/packages/symbiote-silverstripe-gridfieldextensions)[symbiote/silverstripe-advancedworkflow

Adds configurable workflow support to the CMS, with a GUI for creating custom workflow definitions.

46302.4k9](/packages/symbiote-silverstripe-advancedworkflow)[silverstripe/tagfield

Tag field for SilverStripe

561.3M50](/packages/silverstripe-tagfield)[jonom/silverstripe-betternavigator

Front-end utility menu for Silverstripe websites featuring administration and development tools

60435.1k13](/packages/jonom-silverstripe-betternavigator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
