@@ -3,10 +3,10 @@ Bootstrap 5 Form Theme
3
3
4
4
.. versionadded :: 5.3
5
5
6
- The Bootstrap 5 Form Theme was introduce in Symfony 5.3.
6
+ The Bootstrap 5 Form Theme was introduced in Symfony 5.3.
7
7
8
- Symfony provides several ways of integrating Bootstrap into your application. The
9
- most straightforward way is to add the required ``<link> `` and ``<script> ``
8
+ Symfony provides several ways of integrating Bootstrap into your application.
9
+ The most straightforward way is to add the required ``<link> `` and ``<script> ``
10
10
elements in your templates (usually you only include them in the main layout
11
11
template which other templates extend from):
12
12
@@ -85,16 +85,16 @@ If you prefer to apply the Bootstrap styles on a form to form basis, include the
85
85
86
86
.. note ::
87
87
88
- By default, all inputs are rendered with the ``mb-3 `` class on their container.
89
- If you override the `row_attr ` class option, the ``mb-3 `` will be override too
90
- and you will need to explicitly add it.
88
+ By default, all inputs are rendered with the ``mb-3 `` class on their
89
+ container. If you override the `` row_attr `` class option, the ``mb-3 `` will
90
+ be override too and you will need to explicitly add it.
91
91
92
92
Error Messages
93
93
--------------
94
94
95
- Unlike the Bootstrap 4 template , errors are rendered ** after ** the `` input `` element.
96
- However, this still make a strong connection between the error and its `` <input> ``, as
97
- required by the `WCAG 2.0 standard `_.
95
+ Unlike the :doc: ` Bootstrap 4 theme < /form/bootstrap4 >` , errors are rendered
96
+ ** after ** the `` input `` element. However, this still makes a strong connection
97
+ between the error and its `` <input> ``, as required by the `WCAG 2.0 standard `_.
98
98
99
99
Checkboxes and Radios
100
100
---------------------
@@ -106,8 +106,8 @@ Inline Checkboxes and Radios
106
106
----------------------------
107
107
108
108
If you want to render your checkboxes or radios fields `inline `_, you can add
109
- the `checkbox-inline ` or `radio-inline ` class, depending of your Symfony Form
110
- type or `ChoiceType ` configuration, to the label class.
109
+ the `` checkbox-inline `` or `` radio-inline `` class, depending of your Symfony
110
+ Form type or `` ChoiceType ` ` configuration, to the label class.
111
111
112
112
.. configuration-block ::
113
113
@@ -142,8 +142,9 @@ type or `ChoiceType` configuration, to the label class.
142
142
Switches
143
143
________
144
144
145
- Bootstrap 5 allows to render checkboxes as "`switches `_". You can enable this feature
146
- on your Symfony Form ``CheckboxType `` by adding the ``checkbox-switch `` class to the label:
145
+ Bootstrap 5 allows to render checkboxes as `switches `_. You can enable this
146
+ feature on your Symfony Form ``CheckboxType `` by adding the ``checkbox-switch ``
147
+ class to the label:
147
148
148
149
.. configuration-block ::
149
150
@@ -165,12 +166,12 @@ on your Symfony Form ``CheckboxType`` by adding the ``checkbox-switch`` class to
165
166
166
167
.. tip ::
167
168
168
- You can also render your switches inline by simply adding the `` checkbox-inline `` class
169
- on the ``label_attr `` option::
169
+ You can also render your switches inline by simply adding the
170
+ `` checkbox-inline `` class on the ``label_attr `` option::
170
171
171
172
// ...
172
173
'label_attr' => [
173
- 'class' => '` checkbox-inline checkbox-switch',
174
+ 'class' => 'checkbox-inline checkbox-switch',
174
175
],
175
176
// ...
176
177
@@ -181,8 +182,8 @@ on your Symfony Form ``CheckboxType`` by adding the ``checkbox-switch`` class to
181
182
Input group
182
183
___________
183
184
184
- To create `input group `_ in your Symfony Form, simply add the `input-group ` class
185
- to the ``row_attr `` option.
185
+ To create `input group `_ in your Symfony Form, simply add the `` input-group ``
186
+ class to the ``row_attr `` option.
186
187
187
188
.. configuration-block ::
188
189
@@ -206,7 +207,7 @@ to the ``row_attr`` option.
206
207
207
208
.. caution ::
208
209
209
- If you fill the `help ` option of your form, it will also be rendered
210
+ If you fill the `` help ` ` option of your form, it will also be rendered
210
211
as part of the group.
211
212
212
213
Floating labels
@@ -244,19 +245,20 @@ of your form type.
244
245
245
246
.. caution ::
246
247
247
- You **must ** provide a ``label `` and a ``placeholder `` to make floating labels
248
- work properly.
248
+ You **must ** provide a ``label `` and a ``placeholder `` to make floating
249
+ labels work properly.
249
250
250
251
Accessibility
251
252
-------------
252
253
253
- The Bootstrap 5 framework has done a good job making it accessible for functional
254
- variations like impaired vision and cognitive ability. Symfony has taken this one
255
- step further to make sure the form theme complies with the `WCAG 2.0 standard `_.
254
+ The Bootstrap 5 framework has done a good job making it accessible for
255
+ functional variations like impaired vision and cognitive ability. Symfony has
256
+ taken this one step further to make sure the form theme complies with the
257
+ `WCAG 2.0 standard `_.
256
258
257
259
This does not mean that your entire website automatically complies with the full
258
- standard, but it does mean that you have come far in your work to create a design
259
- for **all ** users.
260
+ standard, but it does mean that you have come far in your work to create a
261
+ design for **all ** users.
260
262
261
263
.. _`WCAG 2.0 standard` : https://www.w3.org/TR/WCAG20/
262
264
.. _`inline` : https://getbootstrap.com/docs/5.0/forms/checks-radios/#inline
0 commit comments