biffbangpow/silverstripe-bootstrap-5-forms

Adds templates for bootstrap 5 forms

Installs: 421

Dependents: 1

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 1

Open Issues: 0

Language:Scheme

Type:silverstripe-vendormodule

v1.2.0 2024-10-21 11:08 UTC

This package is auto-updated.

Last update: 2025-07-22 09:38:38 UTC


README

Adds (mostly) CSS classes to the form templates to improve styling with Bootstrap 5.

Works with CMS 6, for CMS 4/5 please use the version 1 branch

Usage

composer require biffbangpow/silverstripe-bootstrap5-forms ^2

Run a dev/build and the module should activate automatically on all front-end forms.

Default button styles can be changed via yml config:

BiffBangPow\SilverstripeBootstrap5Forms\Bootstrap5Forms:
  submit_button_class: 'btn btn-danger'
  non_submit_button_class: 'btn btn-warning'

The module also supports Bootstrap's 'floating labels' functionality. This can be enabled in config with the following setting:

BiffBangPow\SilverstripeBootstrap5Forms\Bootstrap5Forms:
  enable_floating_labels: true

Based on https://github.com/axllent/silverstripe-bootstrap-forms