title: How to display file name with javascript after upload
body: <p>I want to use a different button to upload files to a form. Therefore, i hide the standard upload file button. However, i do want to display the filename when a user uploads a file.</p>
  
  <p>Using wordpress contact form 7, i already tried putting a JS function on the label, but that doesnt work.</p>
  
  <pre><code>&lt;label for="fileInput" class="custom-file-upload" onclick="displayfilename()"&gt;Choose file&lt;/label&gt;
  &lt;input id="fileInput" name="fileInput" type="file" /&gt;
  &lt;span class="fileuploadspan"&gt;No file selected&lt;/span&gt;
  
  &lt;script&gt;
  function displayfilename() 
  $('#fileInput').change(function(){
  var filename = $(this).val().split('\\').pop();
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>The filename should be displayed next to the label.</p>