tengo esto
Código HTML:
Ver original
<form method="post" name="form1" id="demo-form2" enctype="multipart/form-data" data-parsley-validate class="form-horizontal form-label-left" action="hi29_slider_upload.php"> <div class="form-group"> </label> <div class="col-md-6 col-sm-6 col-xs-12"> <!--<div class="dropzone" id="myDropzone"></div>--> </div> </div> <div class="form-group"> </label> <div class="col-md-1 col-sm-6 col-xs-12"> <input type="number" name="orden_img_slider_hi" value="" id="orden_img_slider_hi" required class="form-control col-md-7 col-xs-12"> </div> ............. <div class="form-group"> <div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3"> </div> </div> <input type="hidden" name="MM_insert" value="form1"> </form>
y en script
Código Javascript:
Ver original
<script> Dropzone.options.myDropzone= { url: 'hi29_slider_upload.php', autoProcessQueue: false, uploadMultiple: true, parallelUploads: 1, maxFiles: 1, maxFilesize: 1, acceptedFiles: 'image/*,.jpeg,.jpg,.png,.gif,.JPEG,.JPG,.PNG,.GIF,.rar,application/pdf,.psd', addRemoveLinks: true, init: function() { dzClosure = this; // Makes sure that 'this' is understood inside the functions below. // for Dropzone to process the queue (instead of default form behavior): document.getElementById("submit-all").addEventListener("click", function(e) { // Make sure that the form isn't actually being sent. e.preventDefault(); e.stopPropagation(); dzClosure.processQueue(); }); //send all the form data along with the files: this.on("sendingmultiple", function(data, xhr, formData) { formData.append("img_slider_hi", jQuery("#img_slider_hi").val()); formData.append("lastname", jQuery("#lastname").val()); }); } } </script>