Skip to content

Commit

Permalink
Add documentation for horizontal forms
Browse files Browse the repository at this point in the history
  • Loading branch information
dyve committed Apr 15, 2021
1 parent be2d724 commit d53057c
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions docs/forms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,23 @@ Floating labels

Reference: https://getbootstrap.com/docs/5.0/forms/floating-labels/

This behavior can be triggere dby setting `layout="floating"`.
This behavior can be triggered by setting `layout="floating"`.

Floating labels are supported for widgets that can use `form-control`. An exception is `FileInput` and its descendants, those labels cannot be floating.

Setting `layout="floating"` has no effect on widgets that are not supported.
Setting `layout="floating"` has no effect on widgets that are not supported.

Horizontal forms
----------------

Reference: https://getbootstrap.com/docs/5.0/forms/layout/#horizontal-form

This behavior can be triggered by setting `layout="horizontal"`.

In a horizontal layout, labels and field will receive different styling, resulting in a horizontal layout on supported viewports.

These parameters contain the classes for labels and fields:

- `horizontal_label_class` The class for the label
- `horizontal_field_class` The class for the section with field, help text and errors
- `horizontal_field_offset_class` The offset for fields that have no label, or that use the label as part of their field function (such as checkbox)

0 comments on commit d53057c

Please sign in to comment.