I have created a Bootstrap form consisting of two columns (using Bootstrap 4.3). Inside this form I use a custom file upload button.
The button allows me to select files and also uploads them as intended.
My only problem is that it does not show the name of the uploaded file after uploading it (it should replace "No file chosen", e.g. showing "test.xlsx" instead).
Can someone tell me how to get this to work ? Do I need to add any jQuery etc. for that ?
My HTML:
<div class="form-group row">
<label for="attachment" class="col-md-3 col-lg-2 col-form-label">
<span id="lblAttachment">Attachment</span>:
</label>
<div class="col-md-9 col-lg-10 input-group">
<div class="input-group-prepend">
<span class="input-group-text" id="lblFile">File</span>
</div>
<div class="custom-file">
<input type="file" class="custom-file-input" id="attachment" name="attachment" aria-describedby="lblFile"/>
<label for="attachment" class="custom-file-label">No file chosen</label>
</div>
</div>
</div>
Many thanks in advance.