File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -92,13 +92,17 @@ Custom Forms
92
92
------------
93
93
94
94
Bootstrap 4 has a feature called "`custom forms `_". You can enable that on your
95
- Symfony Form ``RadioType `` and ``CheckboxType `` by adding a class called ``radio-custom ``
96
- and ``checkbox-custom `` respectively.
95
+ Symfony Form ``RadioType `` and ``CheckboxType `` by adding some classes over the label:
96
+
97
+ - for radio, use ``radio-custom ``
98
+ - for a custom checkbox, use ``checkbox-custom ``
99
+ - for having a switch instead of a checkbox, use ``switch-custom ``
97
100
98
101
.. code-block :: twig
99
102
100
103
{{ form_row(form.myRadio, {label_attr: {class: 'radio-custom'} }) }}
101
104
{{ form_row(form.myCheckbox, {label_attr: {class: 'checkbox-custom'} }) }}
105
+ {{ form_row(form.myCheckbox, {label_attr: {class: 'switch-custom'} }) }}
102
106
103
107
Labels and Errors
104
108
-----------------
You can’t perform that action at this time.
0 commit comments