PHPackages                             syntro/silverstripe-bootstrap-forms - 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. syntro/silverstripe-bootstrap-forms

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

syntro/silverstripe-bootstrap-forms
===================================

Silverstripe module adding formfields for use in the frontend

6.0.1(6mo ago)03.4k1[3 PRs](https://github.com/syntro-opensource/silverstripe-bootstrap-forms/pulls)BSD-3-ClausePHPPHP ^8CI passing

Since Jul 26Pushed 6mo ago1 watchersCompare

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

READMEChangelog (7)Dependencies (6)Versions (11)Used By (0)

Silverstripe Bootstrap Forms
============================

[](#silverstripe-bootstrap-forms)

[![🎭 Tests](https://github.com/syntro-opensource/silverstripe-bootstrap-forms/workflows/%F0%9F%8E%AD%20Tests/badge.svg)](https://github.com/syntro-opensource/silverstripe-bootstrap-forms/actions?query=workflow%3A%22%F0%9F%8E%AD+Tests%22+branch%3A%22master%22)[![codecov](https://camo.githubusercontent.com/48447c76bd9b3330831d44774274b39e2e578977d5df77923e00aa11ee911388/68747470733a2f2f636f6465636f762e696f2f67682f73796e74726f2d6f70656e736f757263652f73696c7665727374726970652d626f6f7473747261702d666f726d732f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/syntro-opensource/silverstripe-bootstrap-forms)[![Dependabot](https://camo.githubusercontent.com/6a51b0751549261d7bac57cd594305fc5708bf907fc01b6f34aa97e914da4f6f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646570656e6461626f742d6163746976652d627269676874677265656e3f6c6f676f3d646570656e6461626f74)](https://camo.githubusercontent.com/6a51b0751549261d7bac57cd594305fc5708bf907fc01b6f34aa97e914da4f6f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646570656e6461626f742d6163746976652d627269676874677265656e3f6c6f676f3d646570656e6461626f74)[![phpstan](https://camo.githubusercontent.com/639cc050faeefad1a1d1ab830ca7a7950f1eede4402451b9a11cdc89d3a99066/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d656e61626c65642d73756363657373)](https://github.com/phpstan/phpstan)[![composer](https://camo.githubusercontent.com/ee5415a69e882f8068d02bb8b107928e4c6e7b4f825fed72978ddf3196f55a15/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73796e74726f2f73696c7665727374726970652d626f6f7473747261702d666f726d733f636f6c6f723d73756363657373266c6f676f3d636f6d706f736572)](https://packagist.org/packages/syntro/silverstripe-bootstrap-forms)[![Packagist Version](https://camo.githubusercontent.com/7c70bde0f9f1b796b18a6b90a509f34ca3043381f4802756d401e5575abc47f2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73796e74726f2f73696c7665727374726970652d626f6f7473747261702d666f726d733f6c6162656c3d737461626c65266c6f676f3d636f6d706f736572)](https://packagist.org/packages/syntro/silverstripe-bootstrap-forms)

Silverstripe module for adding bootstrap forms to the frontend more easily.

Introduction
------------

[](#introduction)

Creating forms compatible with the [Bootstrap CSS framework](https://getbootstrap.com)using the provided form fields by Silverstripe is not an easy thing to do. Silverstripes' internally used form fields are not intended to be frontend fields in the first place, meaning the framework is very opinionated about how these fields are rendered in the admin UI and imposes these standards for frontend fields. These standards however are not very compatible with Bootstrap, especially Bootstrap v5.

To counter this, this module introduces a new set of fields, which behave like the originals, but render in a bootstrap compatible way. They also add a separate `holderClasses` attribute, which allows the easy formatting of forms using spacing classes.

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

[](#installation)

To install this module, run the following command:

```
composer require syntro/silverstripe-bootstrap-forms

```

Usage
-----

[](#usage)

### Quick Start

[](#quick-start)

The following fields are available currently:

```
use Syntro\SilverstripeBootstrapForms\Forms\CheckboxField;
use Syntro\SilverstripeBootstrapForms\Forms\CheckboxSetField;
use Syntro\SilverstripeBootstrapForms\Forms\DropdownField;
use Syntro\SilverstripeBootstrapForms\Forms\EmailField;
use Syntro\SilverstripeBootstrapForms\Forms\OptionsetField;
use Syntro\SilverstripeBootstrapForms\Forms\TextareaField;
use Syntro\SilverstripeBootstrapForms\Forms\TextField;

// does not have the HolderClass trait
use Syntro\SilverstripeBootstrapForms\Forms\FieldGroup;
```

All fields have an extra set of methods, analogous the `extraClass` ones:

- `holderClass()`
- `setupDefaultHolderClasses()`
- `hasHolderClass($class)`
- `addHolderClass($class)`
- `removeHolderClass($class)`

They behave the exact same way as their `xxxExtraClass` counterparts, but they control the class on the outer (holder) div.

### Example

[](#example)

To create a good looking multi-column form, simply add the correct classes:

```
FieldGroup::create(
    TextField::create('Name', 'Your Name')->addHolderClass('col'),
    EmailField::create('Email', 'Email')->addHolderClass('col'),
    DropdownField::create(
        'choose',
        'Choose an option',
        [
            'yes' => 'Yes',
            'no' => 'No'
        ]
    )->addHolderClass('col'),
)->addExtraClass('row row-cols-1 row-cols-md-3'),
```

### Docs

[](#docs)

> no docs yet

Contributing
------------

[](#contributing)

See [CONTRIBUTION.md](CONTRIBUTION.md) for mor info.

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance66

Regular maintenance activity

Popularity21

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 68.4% 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 ~198 days

Recently: every ~164 days

Total

7

Last Release

202d ago

Major Versions

1.0.4 → 6.0.02025-10-28

PHP version history (4 changes)1.0.0PHP &gt;=7.4.0

1.0.1PHP ^7.4.0 || ^8.1

1.0.4PHP ^7.4.0 || ^8

6.0.0PHP ^8

### Community

Maintainers

![](https://www.gravatar.com/avatar/289446336e84f3a201ac80def6e4a2a5289815d628ad5e0c0aa57b2f4bc20e73?d=identicon)[mleutenegger](/maintainers/mleutenegger)

---

Top Contributors

[![mleutenegger](https://avatars.githubusercontent.com/u/1339379?v=4)](https://github.com/mleutenegger "mleutenegger (13 commits)")[![cotpat](https://avatars.githubusercontent.com/u/85751624?v=4)](https://github.com/cotpat "cotpat (4 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")

---

Tags

silverstripefrontend forms

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/syntro-silverstripe-bootstrap-forms/health.svg)

```
[![Health](https://phpackages.com/badges/syntro-silverstripe-bootstrap-forms/health.svg)](https://phpackages.com/packages/syntro-silverstripe-bootstrap-forms)
```

###  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)
