PHPackages                             unclecheese/bootstrap-tagfield - 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. unclecheese/bootstrap-tagfield

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

unclecheese/bootstrap-tagfield
==============================

Allows you to create field that allows multiple selection of records, such as tags, compliant with Bootstrap 3

612.8k6[1 issues](https://github.com/unclecheese/silverstripe-bootstrap-tagfield/issues)[3 PRs](https://github.com/unclecheese/silverstripe-bootstrap-tagfield/pulls)JavaScript

Since Jan 5Pushed 8y ago3 watchersCompare

[ Source](https://github.com/unclecheese/silverstripe-bootstrap-tagfield)[ Packagist](https://packagist.org/packages/unclecheese/bootstrap-tagfield)[ RSS](/packages/unclecheese-bootstrap-tagfield/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Bootstrap Tag Field for SilverStripe
====================================

[](#bootstrap-tag-field-for-silverstripe)

Creates a field that allows multiple selection, like a CheckboxSetField to store in a `many_many`, `has_many`, or native field (as comma separated values) and provides **typeahead** searching with **prefetching** and **caching** on a given result set. Useful for multiple selection of a densely populated data set, like tags.

This field is only for frontend forms using the Bootstrap framework. It will not render properly in the CMS.

Screenshot
----------

[](#screenshot)

[![screenshot](https://cloud.githubusercontent.com/assets/654636/5621984/0406af24-95a1-11e4-9c61-0b25f7899dc3.png)](https://cloud.githubusercontent.com/assets/654636/5621984/0406af24-95a1-11e4-9c61-0b25f7899dc3.png)

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

[](#installation)

`composer require unclecheese/bootstrap-tagfield:dev-master`

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

[](#requirements)

- silverstripe/framework 3.1.\*
- unclecheese/bootstrap-forms 1.1.\*

Usage
-----

[](#usage)

A simple tag field that queries against a list of all `Tag` records.

```
BootstrapTagField::create('Tags', 'Add some tags below', Tag::get());
```

This field is not only for tags. It can be used as a replacement for checkboxes when the data set is large.

```
BootstrapTagField::create(
  'Categories',
  'Add categories to your product',
  ProductCategory::get()
    ->filter('Available', true)
);
```

### Optional arguments

[](#optional-arguments)

Set the field to be used as the label (e.g. the text of a checkbox field). Defaults to `Title`.

```
BootstrapTagField::create('Tags', 'Add some tags below', Tag::get(), 'Name');
```

Set the field to be used as the ID of the option (e.g. the value that is stored in the database). Defaults to `ID`.

```
BootstrapTagField::create('Tags', 'Add some tags below', Tag::get(), 'Name', 'Slug');
```

### Prefetching

[](#prefetching)

You can optionally provide a `SS_List` to be loaded into the typeahead search to give immediate results. Once an actual query is made to the remote, the list is backfilled with any new results that come through.

Prefetch a list of popular tags:

```
BootstrapTagField::create('Tags', 'Add some tags below', Tag::get())
    ->setPrefetch(
        Tag::get()
            ->leftJoin('Post_Tags', 'TagID = Tag.ID')
            ->sort('COUNT(Tag.ID)','DESC')
            ->limit(30)
            ->alterDataQuery(function($query) {
                $query->groupby('Tag.ID');
            })
    )
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/654636?v=4)[Aaron Carlino](/maintainers/unclecheese)[@unclecheese](https://github.com/unclecheese)

### Embed Badge

![Health badge](/badges/unclecheese-bootstrap-tagfield/health.svg)

```
[![Health](https://phpackages.com/badges/unclecheese-bootstrap-tagfield/health.svg)](https://phpackages.com/packages/unclecheese-bootstrap-tagfield)
```

###  Alternatives

[austinhyde/iniparser

A Zend\_Config\_Ini like parser for .ini files.

6845.5k1](/packages/austinhyde-iniparser)

PHPackages © 2026

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