You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
minor #13727 Bootstrap 4 Form Theme : Added tip to get <input type="file"> displaying the selected file to upload (Levure)
This PR was submitted for the 3.4 branch but it was merged into the 4.4 branch instead.
Discussion
----------
Bootstrap 4 Form Theme : Added tip to get <input type="file"> displaying the selected file to upload
Added a tip about files input rendering in order to enable the display of the selected file.
<!--
If your pull request fixes a BUG, use the oldest maintained branch that contains
the bug (see https://symfony.com/roadmap for the list of maintained branches).
If your pull request documents a NEW FEATURE, use the same Symfony branch where
the feature was introduced (and `master` for features of unreleased versions).
-->
Commits
-------
3a01e25 Added tip for files input rendering
Copy file name to clipboardExpand all lines: form/bootstrap4.rst
+10Lines changed: 10 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -94,6 +94,14 @@ 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
+
Files input are rendered using the Bootstrap "custom-file" class.
101
+
102
+
Due to Bootstrap internals, the rendered field does not display the selected filename.
103
+
To fix that missing display, you can use the "`bs-custom-file-input`_" plugin (vanilla javascript), as recommended by `Bootstrap Forms documentation`_.
104
+
97
105
Accessibility
98
106
-------------
99
107
@@ -126,6 +134,8 @@ Symfony Form ``RadioType`` and ``CheckboxType`` by adding some classes to the la
0 commit comments