init: function () {
var myDropzone = this;
document.getElementById("submit-all").addEventListener("click", function(e) {
e.preventDefault();
e.stopPropagation();
$(window).scrollTop(0);
if ( $("#property-form").valid() ) {
myDropzone.processQueue();
}
});
// Listen to the sendingmultiple event. In this case, it's the sendingmultiple event instead
// of the sending event because uploadMultiple is set to true.
this.on("sendingmultiple", function() {
console.log('send event');
});
this.on("successmultiple", function(files, response) {
console.log(response);
});
this.on("errormultiple", function(files, response) {
console.log('error');
});
init: function () {
var myDropzone = this;
document.getElementById("submit-all").addEventListener("click", function(e) {
e.preventDefault();
e.stopPropagation();
$(window).scrollTop(0);
if ( $("#property-form").valid() ) {
myDropzone.processQueue();
}
});
// Listen to the sendingmultiple event. In this case, it's the sendingmultiple event instead
// of the sending event because uploadMultiple is set to true.
this.on("sendingmultiple", function() {
console.log('send event');
});
this.on("successmultiple", function(files, response) {
console.log(response);
});
this.on("errormultiple", function(files, response) {
console.log('error');
});
init: function () {
var myDropzone = this;
document.getElementById("submit-all").addEventListener("click", function(e) {
e.preventDefault();
e.stopPropagation();
$(window).scrollTop(0);
if ( $("#property-form").valid() ) {
myDropzone.processQueue();
}
});
// Listen to the sendingmultiple event. In this case, it's the sendingmultiple event instead
// of the sending event because uploadMultiple is set to true.
this.on("sendingmultiple", function() {
console.log('send event');
});
this.on("successmultiple", function(files, response) {
console.log(response);
});
this.on("errormultiple", function(files, response) {
console.log('error');
});
}
});
Buddy,
Where I have to try this piece of code ?
In my .js file right ?
Buddy,I have to put in my addProperty.js file or with the html form directly. ?
init: function () {
var myDropzone = this;
document.getElementById("submit-all").addEventListener("click", function(e) {
e.preventDefault();
e.stopPropagation();
$(window).scrollTop(0);
if ( $("#property-form").valid() ) {
myDropzone.processQueue();
}
});
// Listen to the sendingmultiple event. In this case, it's the sendingmultiple event instead
// of the sending event because uploadMultiple is set to true.
this.on("sendingmultiple", function() {
console.log('send event');
});
this.on("successmultiple", function(files, response) {
console.log(response);
});
this.on("errormultiple", function(files, response) {
console.log('error');
});
init: function () {
var myDropzone = this;
document.getElementById("submit-all").addEventListener("click", function(e) {
e.preventDefault();
e.stopPropagation();
$(window).scrollTop(0);
if ( $("#property-form").valid() ) {
myDropzone.processQueue();
}
});
// Listen to the sendingmultiple event. In this case, it's the sendingmultiple event instead
// of the sending event because uploadMultiple is set to true.
this.on("sendingmultiple", function() {
console.log('send event');
});
this.on("successmultiple", function(files, response) {
console.log(response);
});
this.on("errormultiple", function(files, response) {
console.log('error');
});
}
});
});
Still $_FILES is empty
Nothing in console. We didn't specified the url for dropzone?
you must add the class dropzone to your form and dropzone autodiscover the form and the action. It can send your datas and your files in one xhr request.
You must remove the class dropzone to your div.