send formData using dropzone.js on sendingmultiple
<p>The dropzone.js documentation/wiki doesn't say how to send form fields.</p>

<p>I just read about the <a href="https://developer.mozilla.org/en-US/docs/Web/API/FormData/FormData" rel="noreferrer">FormData object</a> and it says how to populate the object with the form fields. The problem is that populating the object with the whole form won't get the data send, but if I append the form fields one by one they'll get sent...</p>

<p>This works:</p>

<pre><code>formData.append('name', jQuery('#name').val());
</code></pre>

<p>This doesn't:</p>

<pre><code>var myForm = document.querySelector('form');
formData = new FormData(myForm);
</code></pre>

<p>The first example will send the <code>#name</code> field but the second won't send anything (just the files).</p>

<p>How can I trigger that? I'd like to make dropzone send the whole form along the files (both in the same request).</p>

<pre><code>init: function() {
    var myDropzone = this,
        submitButton = document.querySelector("[type=submit]");

    submitButton.addEventListener('click', function(e) {
        e.preventDefault();
        e.stopPropagation();
        myDropzone.processQueue();
    });

    myDropzone.on('sendingmultiple', function(data, xhr, formData) {
        // this will get sent
        formData.append('name', jQuery('#name').val());
        // this won't
        var myForm = document.querySelector('form');
        formData = new FormData(myForm);
    });
    myDropzone.on('successmultiple', function(files, response) {
        //window.location.replace("/home");
    });
    myDropzone.on('errormultiple', function(files, response) {
        alert(response);
    });
}
</code></pre>