dropzone形式全身。

时间:2016-03-19 11:18:10

标签: javascript php jquery html dropzone.js

我将此代码用于以正常形式嵌入dropzone

的index.php

        <form id="my-awesome-dropzone"  class="dropzone" action="upload.php">
          <div class="dropzone-previews"> </div> <!-- this is were the previews should be shown. -->

          <!-- Now setup your input fields -->
          <input type="text" name="Name" />
          <input type="text" name="Description" />

          <button type="submit">Submit data and files!</button>

        </form>

自定义dropzone JS

   Dropzone.options.myAwesomeDropzone = { 
   autoProcessQueue: false,
        uploadMultiple: false,
         parallelUploads: 100,
          maxFiles: 100,


    init: function() {
var myDropzone = this;


this.element.querySelector("button[type=submit]").addEventListener("click", function(e) {

  e.preventDefault();
  e.stopPropagation();
  myDropzone.processQueue();
});


this.on("sendingmultiple", function() {
  alert("successfully");
});
this.on("successmultiple", function(files, response) {
  alert("successfully");

});
this.on("errormultiple", function(files, response) {
  alert("Error");

});}}
请帮助我的兄弟兄弟!下拉表格以整体形式出现。我需要在此代码中修复的内容。

1 个答案:

答案 0 :(得分:0)

我不明白整个问题,但我发现代码中只有少数问题。

在以下代码段中,我更新了您的代码,以便查看提醒消息:

&#13;
&#13;
=IFERROR(MID(CONCATENATE(QUERY($A$2:$E,"select ', ',SUM(B),' ',C where(D = '"&I2&"') group by (C)",-1)),18,LEN(CONCATENATE(QUERY($A$2:$E,"select ', ',SUM(B),' ',C where(D = '"&I2&"') group by (C)",-1)))),IFERROR(1/0))
&#13;
$(function () {
  Dropzone.options.myAwesomeDropzone = {
    previewsContainer: '.dropzone-previews',
    autoProcessQueue: false,
    uploadMultiple: false,
    parallelUploads: 100,
    maxFiles: 100,
    init: function () {
      var myDropzone = this;

      this.element.querySelector("button[type=submit]").addEventListener("click", function (e) {
        e.preventDefault();
        e.stopPropagation();
        myDropzone.processQueue();
      });
    },
    sending: function(file, xhr, formData) {
      alert('sending');
    },
    sendingmultiple: function (file, xhr, formData) {
      alert("successfully");
    },
    successmultiple: function (file, xhr, formData) {
      alert("successfully");

    },
    error: function (a, errorMessage, xhr) {
      alert("Error");
    }
  };
});
&#13;
&#13;
&#13;