PHPackages                             janneklouman/silverstripe-spinner-field - 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. janneklouman/silverstripe-spinner-field

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

janneklouman/silverstripe-spinner-field
=======================================

A spinner field for SilverStripe using jQuery UI's Spinner Widget.

v1.1.3(9y ago)09522[1 issues](https://github.com/jjjjjjjjjjjjjjjjjjjj/silverstripe-spinner-field/issues)BSD-3-ClausePHPPHP &gt;=5.4

Since Jun 24Pushed 8y ago1 watchersCompare

[ Source](https://github.com/jjjjjjjjjjjjjjjjjjjj/silverstripe-spinner-field)[ Packagist](https://packagist.org/packages/janneklouman/silverstripe-spinner-field)[ RSS](/packages/janneklouman-silverstripe-spinner-field/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (1)Versions (8)Used By (0)

Spinner field for SilverStripe
==============================

[](#spinner-field-for-silverstripe)

A spinner field for SilverStripe using jQuery UI's Spinner Widget providing a nice interface for number input fields and the ability to customize them.

Requirements
------------

[](#requirements)

```
"require": {
    "php": "^5.4",
    "silverstripe/framework": "~3.1"
}
```

Installation
------------

[](#installation)

`composer require jjjjjjjjjjjjjjjjjjjj/silverstripe-spinner-field`

Example usage
-------------

[](#example-usage)

```
SpinnerField::create(

    // Field name
    'Answer',

    // Label
    'What is the answer to the ultimate question of life, the universe, and everything?',

    // Initial value
    rand(0, 42),

    // Optional options (see available options below under heading: UI settings)
    [
        'min'  => 0,
        'max'  => 42,
        'step' => 3 // Increment and decrement in steps of 3
    ]

);
```

Configuration
-------------

[](#configuration)

#### UI settings

[](#ui-settings)

You can configure the spinner widget's UI by passing an array of options in the constructor like shown [above](#example-usage), or you could do something like:

```
// Setting a batch of options.
$spinnerField->setUIOptions(
    [
        'disabled'  => true,
        'max'       => 314159265359,
        'page'      => 100000000000,
        'icon_up'   => 'ui-icon-plus',
        'icon_down' => 'ui-icon-minus'
    ]
);

// On second thought...
$spinnerField->setUIOption('disabled', false);
```

Here's a list of available UI options. See  for detailed description of the options and what they do.

```
// Available options and their default values
[
    culture      => null,
    disabled     => false,
    icon_down    => 'ui-icon-triangle-1-s',
    icon_up      => 'ui-icon-triangle-1-n',
    incremental  => true,
    max          => null,
    min          => null,
    numberFormat => null, // Currently only 'n'||null is supported
    page         => 10,
    step         => 1
]
```

#### Field settings

[](#field-settings)

```
/**
 * Enforce step validation. Will cause validation to fail if input is
 * not evenly divisible with the 'step' UI option. Example: if 'step'
 * is set to 4, validation will fail for 0 !== $input % 4
 *
 * @var bool
 */
protected $enforceStepValidation = false;
```

```
/**
 * Will cause validation to fail if input is below the 'min' UI option.
 *
 * @var bool
 */
protected $enforceBelowMinValidation = true;
```

```
/**
 * Will cause validation to fail if input is above the 'max' UI option.
 *
 * @var bool
 */
protected $enforceAboveMaxValidation = true;
```

Furthermore see [NumericField](https://github.com/silverstripe/silverstripe-framework/blob/master/forms/NumericField.php) for inherited field settings.

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 97% 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 ~4 days

Total

6

Last Release

3638d ago

PHP version history (2 changes)v1.1.0PHP ^5.4

v1.1.2PHP &gt;=5.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/da327bbe14f5f823296a59bbc946a00946b2696d702831e325be20fd9149aa2b?d=identicon)[jjjjjjjjjjjjjjjjjjjj](/maintainers/jjjjjjjjjjjjjjjjjjjj)

---

Top Contributors

[![jjjjjjjjjjjjjjjjjjjj](https://avatars.githubusercontent.com/u/9065899?v=4)](https://github.com/jjjjjjjjjjjjjjjjjjjj "jjjjjjjjjjjjjjjjjjjj (32 commits)")[![banglashi](https://avatars.githubusercontent.com/u/942981?v=4)](https://github.com/banglashi "banglashi (1 commits)")

---

Tags

silverstripefieldspinner

### Embed Badge

![Health badge](/badges/janneklouman-silverstripe-spinner-field/health.svg)

```
[![Health](https://phpackages.com/badges/janneklouman-silverstripe-spinner-field/health.svg)](https://phpackages.com/packages/janneklouman-silverstripe-spinner-field)
```

###  Alternatives

[silverstripe/tagfield

Tag field for SilverStripe

561.3M50](/packages/silverstripe-tagfield)[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-advancedworkflow

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

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

A sortable multiple select field for managing many-to-many relations

1342.6k2](/packages/kinglozzer-multiselectfield)[burnbright/silverstripe-externalurlfield

Provides SilverStripe with a DBField and FormField for handling external URLs.

109.6k1](/packages/burnbright-silverstripe-externalurlfield)[adrhumphreys/silverstripe-textdropdownfield

A text field combined with a dropdown field.

106.4k](/packages/adrhumphreys-silverstripe-textdropdownfield)

PHPackages © 2026

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