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
9494For a checkbox/radio field, calling ``form_label() `` doesn't render anything.
9595Due to Bootstrap internals, the label is already rendered by ``form_widget() ``.
9696
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+
97104Accessibility
98105-------------
99106
@@ -122,6 +129,8 @@ Symfony Form ``RadioType`` and ``CheckboxType`` by adding some classes to the la
122129 {{ form_row(form.myCheckbox, {label_attr: {class: 'switch-custom'} }) }}
123130
124131 .. _`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
125134.. _`custom forms` : https://getbootstrap.com/docs/4.4/components/forms/#custom-forms
126135.. _`custom radio` : https://getbootstrap.com/docs/4.4/components/forms/#radios
127136.. _`custom checkbox` : https://getbootstrap.com/docs/4.4/components/forms/#checkboxes
You can’t perform that action at this time.
0 commit comments