Rails Bootstrap Forms v4.0.0 Release Notes

Release Date: 2018-10-27 // over 5 years ago
  • ๐Ÿฑ ๐Ÿšจ 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

    • ๐Ÿ’Ž [#476] Give a way to pass classes to the div.form-check wrapper for check boxes and radio buttons - @lcreid.
    • 0๏ธโƒฃ 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'.

    ๐Ÿ›  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.