Skip to content

Commit

Permalink
multiple-image
Browse files Browse the repository at this point in the history
  • Loading branch information
pavlosb committed Apr 18, 2024
1 parent 1d4ff36 commit 7a3874f
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions application/views/inspectionform.php
Original file line number Diff line number Diff line change
Expand Up @@ -336,23 +336,25 @@ function uploadFile() {
contentType: false,
processData: false,
success:function(response){
console.table(response.files);
console.log(response.hm);

$.each(files, function(k, url) {

/* document.getElementById('results').innerHTML +=
'<div id="imgbox-'+i+'" class="col-md-3"><img id="imageprev-'+i+'" class="img-fluid" src="'+response.url+'"/></div>';
document.getElementById('results').innerHTML +=
'<div id="imgbox-'+i+'" class="col-md-3"><img id="imageprev-'+i+'" class="img-fluid" src="'+files[k]+'"/></div>';
var input = document.createElement("input");


input.setAttribute("type", "hidden");

input.setAttribute("name", "inspimg["+i+"]");

input.setAttribute("value", response.url);
input.setAttribute("value", files[k]);

//append to form element that you want .
document.getElementById("imagefields").appendChild(input); */
}
document.getElementById("imagefields").appendChild(input);
i=i+1;
});
}
});


Expand Down

0 comments on commit 7a3874f

Please sign in to comment.