Skip to content

4.0.0

Compare
Choose a tag to compare
@lcreid lcreid released this 12 Nov 05:26
· 310 commits to main since this release
ff7ad3a

🚨 This release adds support for Bootstrap v4 and drops support for Bootstrap v3. 🚨

If your app uses Bootstrap v3, you should continue using bootstrap_form 2.7.x instead.

Bootstrap v3 and v4 are very different, and thus bootstrap_form now produces different markup in order to target v4. The changes are too many to list here; you can refer to Bootstrap's Migrating to v4 page for a detailed explanation.

In addition to these necessary markup changes, the bootstrap_form API itself has the following important changes in this release.

Breaking changes

New features

  • [bootstrap-ruby#476] Give a way to pass classes to the div.form-check wrapper for check boxes and radio buttons - @lcreid.
  • 461: default form-inline class applied to parent content div on date select helpers. Can override with a :skip_inline option on the field helper - @lancecarlson.
  • The button, submit, and primary helpers can now receive an additional option, extra_class. This option allows us to specify additional CSS classes to be added to the corresponding button/input, while maintaining the original default ones. E.g., a primary button with an extra_class 'test-button' will have its final CSS classes declaration as 'btn btn-primary test-button'.
  • #488: add required option on form_group_builder - @ThomasSevestre.

Bugfixes

  • #347 Fix wrapper_class and wrapper options for helpers that have html_options.
  • #472 Use id option value as for attribute of label for custom checkboxes and radio buttons.
  • #478 Fix offset for form group without label when multiple label widths are specified.