From cfcd7d124a232bdc1c898f6ad205da8157d24190 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 8 Sep 2019 15:06:00 +0200 Subject: [PATCH] Docs: Add JavaScript filename example Embedding it directly into the docs is better than an external jsfiddle, especially since the code snippet is so simple. --- docs/documentation/form/file.html | 33 +++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/docs/documentation/form/file.html b/docs/documentation/form/file.html index 46659461..b7dafc79 100644 --- a/docs/documentation/form/file.html +++ b/docs/documentation/form/file.html @@ -459,6 +459,35 @@ meta: {% endcapture %} +{% capture file_javascript %} +
+ +
+ + +{% endcapture %} + {% capture file_sizes_boxed_name %}
@@ -725,9 +754,9 @@ meta:

A file upload input requires JavaScript to retrieve the selected file name. -
- User @chintanbanugaria on GitHub has provided a simple solution on JSFiddle. + Here is an example of how this could be done:

+ {% include elements/snippet.html content=file_javascript %}
{% include elements/variables.html