I have my HTML where I'm trying to use Dropzone.js
<form id="loadDropzone" method="post" action="" class="dropzone"></form>
And my JavaScript
Dropzone.autoDiscover = true;
$("div#loadDropzone").dropzone({//loading dropzone options
paramName: 'photos',
url: '#',
dictDefaultMessage: "Insert your files",
clickable: true,
enqueueForUpload: true,
maxFilesize: 2,
uploadMultiple: false,
addRemoveLinks: true,
init: function(){
this.on("addedfile", handleFileAdded);
this.on("removedfile", handleFileRemoved);
this.on("error", function(file){if (!file.accepted) this.removeFile(file);});
}
});
My intention is to load a simple dropzone form where I can add files. If I put something in the HTML, the action loads the defaults settings (I can see it like the example on the Dropzone.js website). If I leave the action in form blank (like posted), Dropzone.js is not working.
Any help to load a simple dropzone form?