DropZonejs: Submit form without files

后端 未结 7 1758
一生所求
一生所求 2020-12-05 14:27

I\'ve successfully integrated dropzone.js inside an existing form. This form posts the attachments and other inputs like checkboxes, etc.

When I submit the form wit

7条回答
  •  遥遥无期
    2020-12-05 14:47

    Depending on your situation you could simply submit the form:

    if (myDropzone.getQueuedFiles().length > 0) {                        
       myDropzone.processQueue();  
    } else {                       
       $("#my_form").submit();
    }
    

提交回复
热议问题