title: Dropzone.js with onetime submit button
body: <p>Implementing Dropzone.js and would like to have a onetime submit after all photos are added to the dropzone. This is running with PHP kohana inside a wamp server right now. For some reason I am unable to pass the photos to the php page.</p>
  
  <p>Dropzone config on js</p>
  
  <p>$(document).ready(function() {</p>
  
  <pre><code>   Dropzone.options.dropzoneForm = {
              // The camelized version of the ID of the form element
  
              paramName: "files",
              autoProcessQueue: false,
              uploadMultiple: true,
              parallelUploads: 100,
              maxFiles: 100,
              previewsContainer: ".dropzone-previews",
              clickable: true,
              dictDefaultMessage: 'Add files to upload by clicking or droppng them here.',
              addRemoveLinks: true,
              acceptedFiles: '.jpg,.pdf,.png,.bmp',
              dictInvalidFileType: 'This file type is not supported.',
  
              // The setting up of the dropzone
              init: function () {
                  var myDropzone = this;
  
                  $("button[type=submit]").bind("click", function (e) {
                      e.preventDefault();
                      e.stopPropagation();
                      // If the user has selected at least one file, AJAX them over.
                      if (myDropzone.files.length !== 0) {
                          myDropzone.processQueue();
                      // Else just submit the form and move on.
                      } else {
                          $('#dropzone-form').submit();
                      }
                  });
  
                  this.on("successmultiple", function (files, response) {
                      // After successfully sending the files, submit the form and move on.
                      $('#dropzone-form').submit();
                  });
              }
          }
     });
  </code></pre>
  
  <p>Form</p>
  
  <pre><code> &lt;div id="photoContainer"&gt;
  
          &lt;form action="/inspections/uploadphotos" method="post" 
          enctype="multipart/form-data" class="dropzone dz-clickable dropzone-previews" id="dropzone-form"&gt;
  
          &lt;/form&gt;
             &lt;button type="submit" id="dz" name="dz" value="Submit " /&gt; Submit Photos&lt;/button&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>PHP Kohana</p>
  
  <pre><code>    if (!empty($_FILES)) {
      print_r($_FILES);
  
  }
  </code></pre>
  
  <p>The problem is that $_Files is always empty. Can anyone provide some assistance on configuring this? </p>