Dropzone.js inside Modal does not work
<p>I'm using dropzone.js to upload files to the server. I included the js and css files and the "drag zone" is within a modal window that opens on the click of a button (the modal includes more elements that are not relevant here)</p>

<p>The problem I'm facing is that, inside the modal dialogue the "add file" section does not get triggered. Nothing happens when clicking on it, neither am I able to drag and drop files.</p>

<p>I saw a similar problem in another thread, but the solutions provided there didn't work for me (<a href="https://stackoverflow.com/questions/22139776/using-dropzone-js-inside-bootstrap-modal">here</a>: <a href="https://stackoverflow.com/questions/22139776/using-dropzone-js-inside-bootstrap-modal">Using Dropzone.js inside Bootstrap modal</a>).
I have been looking for an answer for days with no luck. Any ideas will be welcome.</p>

<p>This is my code</p>

<p>CSHTML:</p>

<pre><code>[...]
    &lt;div class="W100pc"&gt;
        &lt;div class="FormUnit W045pc AdjustedWidth"&gt;
            &lt;div id="DropzoneElement" class="dropzone"&gt;
                &lt;div class="dz-message"&gt;Add file here&lt;/div&gt;
            &lt;/div&gt;
        &lt;/div&gt;
    &lt;/div&gt;
[...]
</code></pre>

<p>JS:</p>

<pre><code>[...]
    $(document).ready(function() {

        Dropzone.autoDiscover = false;
        //Simple Dropzonejs 
        $("#DropzoneElement").dropzone({
            maxFilesize: 100,
            url: window.doSomethingHere,
            addRemoveLinks: true,
            success: function(file, response) {
                var imgName = response;
                file.previewElement.classList.add("dz-success");
                console.log("Successfully uploaded :" + imgName);
            },
            error: function(file, response) {
                file.previewElement.classList.add("dz-error");
            }
        });
    }
[...]
</code></pre>

<p>Thanks for your help.</p>