File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -94,6 +94,13 @@ Checkboxes and Radios
94
94
For a checkbox/radio field, calling ``form_label() `` doesn't render anything.
95
95
Due to Bootstrap internals, the label is already rendered by ``form_widget() ``.
96
96
97
+ File inputs
98
+ -----------
99
+
100
+ File inputs are rendered using the Bootstrap "custom-file" class, which hides
101
+ the name of the selected file. To fix that, use the `bs-custom-file-input `_
102
+ JavaScript plugin, as recommended by `Bootstrap Forms documentation `_.
103
+
97
104
Accessibility
98
105
-------------
99
106
@@ -122,6 +129,8 @@ Symfony Form ``RadioType`` and ``CheckboxType`` by adding some classes to the la
122
129
{{ form_row(form.myCheckbox, {label_attr: {class: 'switch-custom'} }) }}
123
130
124
131
.. _`WCAG 2.0 standard` : https://www.w3.org/TR/WCAG20/
132
+ .. _`bs-custom-file-input` : https://www.npmjs.com/package/bs-custom-file-input
133
+ .. _`Bootstrap Forms documentation` : https://getbootstrap.com/docs/4.4/components/forms/#file-browser
125
134
.. _`custom forms` : https://getbootstrap.com/docs/4.4/components/forms/#custom-forms
126
135
.. _`custom radio` : https://getbootstrap.com/docs/4.4/components/forms/#radios
127
136
.. _`custom checkbox` : https://getbootstrap.com/docs/4.4/components/forms/#checkboxes
You can’t perform that action at this time.
0 commit comments