PHPackages                             silverware/iconsetfield - 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. silverware/iconsetfield

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

silverware/iconsetfield
=======================

SilverWare IconSetField Module.

1.1.0(7y ago)419BSD-3-ClausePHPPHP &gt;=5.6.0

Since Nov 21Pushed 7y ago1 watchersCompare

[ Source](https://github.com/praxisnetau/silverware-iconsetfield)[ Packagist](https://packagist.org/packages/silverware/iconsetfield)[ Docs](https://github.com/praxisnetau/silverware-iconsetfield)[ RSS](/packages/silverware-iconsetfield/feed)WikiDiscussions master Synced 3d ago

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

SilverWare IconSetField Module
==============================

[](#silverware-iconsetfield-module)

[![Latest Stable Version](https://camo.githubusercontent.com/da3929066d9929d3cf65696da141a67a30836cb8549d628c372f071eeb0d58b3/68747470733a2f2f706f7365722e707567782e6f72672f73696c766572776172652f69636f6e7365746669656c642f762f737461626c65)](https://packagist.org/packages/silverware/iconsetfield)[![Latest Unstable Version](https://camo.githubusercontent.com/562414d70be1e81bfb305d8a2c553b6479ad017c9b1b12bcc00ccd2b4f622e8f/68747470733a2f2f706f7365722e707567782e6f72672f73696c766572776172652f69636f6e7365746669656c642f762f756e737461626c65)](https://packagist.org/packages/silverware/iconsetfield)[![License](https://camo.githubusercontent.com/93edf8b51a351106a06a66078f7e8f1d84051a223afe74caaa7c8cadd7278d8a/68747470733a2f2f706f7365722e707567782e6f72672f73696c766572776172652f69636f6e7365746669656c642f6c6963656e7365)](https://packagist.org/packages/silverware/iconsetfield)

A responsive form field for [SilverStripe v4](https://github.com/silverstripe/silverstripe-framework), similar to CheckboxSetField... but with [Font Awesome](http://fontawesome.io) icons!

[![IconSetField](https://camo.githubusercontent.com/c8390f3cc6e44e2688893cbda8bd0a6891ceb3ed869d6eb8f6642992501c68de/68747470733a2f2f692e696d6775722e636f6d2f3971474c3966462e676966)](https://camo.githubusercontent.com/c8390f3cc6e44e2688893cbda8bd0a6891ceb3ed869d6eb8f6642992501c68de/68747470733a2f2f692e696d6775722e636f6d2f3971474c3966462e676966)

Contents
--------

[](#contents)

- [Requirements](#requirements)
- [Installation](#installation)
- [Configuration](#configuration)
- [Usage](#usage)
- [Issues](#issues)
- [Contribution](#contribution)
- [Attribution](#attribution)
- [Maintainers](#maintainers)
- [License](#license)

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

[](#requirements)

- [SilverStripe Framework v4](https://github.com/silverstripe/silverstripe-framework)
- [SilverWare Font Icons](https://github.com/praxisnetau/silverware-font-icons) (includes [Font Awesome](http://fontawesome.io))
- default CSS classes are configured for the [Bootstrap](http://getbootstrap.com) grid

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

[](#installation)

Installation is via [Composer](https://getcomposer.org):

```
$ composer require silverware/iconsetfield

```

**Note:** forms on the website will automatically load the field requirements if the app is using [SilverWare](https://github.com/praxisnetau/silverware). If you are using a vanilla SilverStripe project, you'll need to load the module script and styles in your app bundle (jQuery is required):

- `silverware/iconsetfield: client/dist/js/bundle.js`
- `silverware/iconsetfield: client/dist/styles/bundle.css`

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

[](#configuration)

As with all SilverStripe modules, configuration is via YAML. Extensions to `LeftAndMain` and `ContentController` are applied via `config.yml`.

### Theme

[](#theme)

The module supports a theme for both the CMS and forms on the website. To define the theme, use the following YAML configuration:

```
# Custom theme for CMS:

SilverStripe\Admin\LeftAndMain:
  iconsetfield_theme:
    hover-background: ''
    hover-foreground: ''
    checked-background: ''
    checked-foreground: ''
    checked-border: ''

# Custom theme for website forms:

SilverStripe\CMS\Controllers\ContentController:
  iconsetfield_theme:
    hover-background: ''
    hover-foreground: ''
    checked-background: ''
    checked-foreground: ''
    checked-border: ''
```

Replace each `` with your desired color hex or rgba code.

### Columns

[](#columns)

By default, the field uses Bootstrap column classes. You can change the column classes by adding them to your YAML:

```
SilverWare\IconSetField\Forms\IconSetField:
  column_class_small: 'col-sm-%d'
  column_class_large: 'col-lg-%d'
```

Usage
-----

[](#usage)

Create the field either as part of a `Form`, or within your `getCMSFields()` method:

```
use SilverWare\IconSetField\Forms\IconSetField;

$field = IconSetField::create(
    'RelationName',
    'Title of field',
    [
        1 => [
            'icon' => 'envelope',
            'text' => 'Mail'
        ],
        2 => [
            'icon' => 'facebook',
            'text' => 'Facebook'
        ],
        3 => [
            'icon' => 'twitter',
            'text' => 'Twitter'
        ]
    ]
);
```

The first parameter is the name of the field or many-many relation to save to, and the second is the field title. The third parameter defines the source for the field, and is a nested array consisting of ID values mapped to arrays containing the icon code (i.e. `fa-`) and the text for the option.

### Maximum Height

[](#maximum-height)

You can define a maximum height (in pixels) for your field by using the `setMaxHeight()` method:

```
$field->setMaxHeight(200);
```

This will fix the maximum height of your field to 200 pixels, and add a scrollbar to view the remaining options.

### Column Widths

[](#column-widths)

The field supports custom column widths for small and large devices. By default, the field uses a value of `6` for small devices, and `4` for large devices. Based on the Bootstrap grid of `12`, this means you'll see two options per row on small devices, and three options per row on large devices.

You can change these values by using:

```
$field->setSmallWidth(4);  // 3 options per row on small devices
$field->setLargeWidth(3);  // 4 options per row on large devices
```

Options will always be one per row on the smallest screens (i.e. mobile).

Issues
------

[](#issues)

Please use the [GitHub issue tracker](https://github.com/praxisnetau/silverware-iconsetfield/issues) for bug reports and feature requests.

Contribution
------------

[](#contribution)

Your contributions are gladly welcomed to help make this project better. Please see [contributing](CONTRIBUTING.md) for more information.

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

[](#attribution)

- Makes use of [Font Awesome](http://fontawesome.io) by [Dave Gandy](https://github.com/davegandy).
- Makes use of [Bootstrap](http://getbootstrap.com) by the [Bootstrap Authors](https://github.com/twbs/bootstrap/graphs/contributors)and [Twitter, Inc](https://twitter.com).

Maintainers
-----------

[](#maintainers)

[![Colin Tucker](https://avatars3.githubusercontent.com/u/1853705?s=144)](https://github.com/colintucker)[![Praxis Interactive](https://avatars2.githubusercontent.com/u/1782612?s=144)](https://www.praxis.net.au)[Colin Tucker](https://github.com/colintucker)[Praxis Interactive](https://www.praxis.net.au)License
-------

[](#license)

[BSD-3-Clause](LICENSE.md) © Praxis Interactive

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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 ~203 days

Total

2

Last Release

2893d ago

### Community

Maintainers

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

---

Top Contributors

[![colintucker](https://avatars.githubusercontent.com/u/1853705?v=4)](https://github.com/colintucker "colintucker (5 commits)")

---

Tags

fieldfont-awesomeiconsilverstripe-4silverwaresilverstripesilverwareiconsetfield

### Embed Badge

![Health badge](/badges/silverware-iconsetfield/health.svg)

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

###  Alternatives

[silverstripe/multi-domain

Allows multiple domains to access one CMS instance, mapping them to different sections of the hierarchy

141.6k](/packages/silverstripe-multi-domain)

PHPackages © 2026

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