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

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

axllent/silverstripe-bootstrap-forms
====================================

An extension to add CSS classes to Silverstripe forms to play nicer with Twitter Bootstrap

2.0.4(2y ago)452.5k↓17.2%73MITPHP

Since Jul 21Pushed 2y ago2 watchersCompare

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

READMEChangelog (8)Dependencies (1)Versions (10)Used By (3)

Add CSS classes to Silverstripe forms to play nicer with Twitter Bootstrap
==========================================================================

[](#add-css-classes-to-silverstripe-forms-to-play-nicer-with-twitter-bootstrap)

An extension to add CSS classes to Silverstripe forms to "play nicer" with Twitter Bootstrap, mostly by adding the `form-control` bootstrap CSS classes to form elements (input, dropdown, submit etc).

This is designed to be a plug-and-play extension, without requiring you to change your existing forms on your website. This includes all forms such as login forms, password reset forms, as well as any other form you have created.

It extends `FormField` to try provide a transparent "manipulation" of the rendered form fields, adding some bootstrap CSS to the rendered fields. It does not produce [bootstrap-specific html](http://getbootstrap.com/css/#forms) for your forms.

`FormField` unfortunately only has a `$this->extend('onBeforeRender', $this);` in `Field` that allows manipulation of the field itself, and not the parent field\_holder. This allows only a very limited amount of flexibility, and prevents an extension from changing the field\_holder.

Form submit buttons get a `btn btn-primary` class added, and any other buttons get a `btn btn-default` class added.

Forms will still need some additional CSS styling (to set spacing) as the form's field\_holders cannot be modified to the limitations mentioned above.

Features
--------

[](#features)

It adds the `form-control` CSS class to all front-end:

- TextField (and extended classes)
- TextAreaField
- DropdownField

It renders CheckboxSetField &amp; OptionsetField with different field templates (see templates/Forms).

It does **not**:

- Modify field holders (`onBeforeRender()` does not allow that)
- Support FieldGroup (you'll need to use CSS to do that)
- Apply bootstrap-specific CSS classes to form messages

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

[](#requirements)

- Silverstripe ^4 || ^5

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

[](#installation)

### Install via Composer

[](#install-via-composer)

You can install it via composer with `composer require axllent/silverstripe-bootstrap-forms`

Basic usage
-----------

[](#basic-usage)

Simply install (and flush), add the checkbox CSS to your styles and you're good to go.

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 91.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 ~379 days

Recently: every ~580 days

Total

8

Last Release

933d ago

Major Versions

1.1.1 → 2.0.02017-06-19

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1463435?v=4)[Ralph Slooten](/maintainers/axllent)[@axllent](https://github.com/axllent)

---

Top Contributors

[![axllent](https://avatars.githubusercontent.com/u/1463435?v=4)](https://github.com/axllent "axllent (32 commits)")[![a2nt](https://avatars.githubusercontent.com/u/672794?v=4)](https://github.com/a2nt "a2nt (1 commits)")[![gherkins](https://avatars.githubusercontent.com/u/824927?v=4)](https://github.com/gherkins "gherkins (1 commits)")[![jsirish](https://avatars.githubusercontent.com/u/1163643?v=4)](https://github.com/jsirish "jsirish (1 commits)")

---

Tags

silverstripebootstrapForms

### Embed Badge

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

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

###  Alternatives

[unclecheese/display-logic

Allows assignment of conditions for display and hide of specific form fields based on client side behavior.

771.0M101](/packages/unclecheese-display-logic)[netojose/laravel-bootstrap-4-forms

Bootstrap 4 form builder for Laravel 5

182115.3k](/packages/netojose-laravel-bootstrap-4-forms)[silverstripe/multiform

SilverStripe forms with multiple steps, flow control and state persistence

3156.0k3](/packages/silverstripe-multiform)[unclecheese/bootstrap-forms

Allows you to create forms in SilverStripe that are compatible with Twitter Bootstrap.

5539.4k](/packages/unclecheese-bootstrap-forms)[sheadawson/silverstripe-select2

A set of silverstripe form fields based on http://ivaynberg.github.com/select2/

1923.5k3](/packages/sheadawson-silverstripe-select2)

PHPackages © 2026

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