I was hoping someone can update this JSFiddle code for me so that multiple input boxes appear for multiple selected images.
It works perfectly for for a Single image.
https://jsfiddle.net/WWNnV/609/
document.getElementById('upload').onchange = uploadOnChange;
function uploadOnChange() {
var filename = this.value;
var lastIndex = filename.lastIndexOf("\\");
if (lastIndex >= 0) {
filename = filename.substring(lastIndex + 1);
}
document.getElementById('filename').value = filename + "_date";
}
<input id="upload" type="file" multiple="multiple" />
<input id="filename" type="text" />
Any assistance will be appreciated.
Updated jsfiddle
Changed jQuery version.
Use
this.files
instead ofthis.value
to get all files selected by user.