Home How to use dropzone inside a form?
Reply: 0

How to use dropzone inside a form?

user941 Published in August 15, 2018, 8:44 pm

I want to use dropzone inside a form and submit images along with the form submit. So I used as shown below but this way it will accept the image if it drops anywhere in the form. But I want to allow the user only drop their image in "dropClickable" div. How can I achieve that?

<form enctype="multipart/form-data" action="action" accept-charset="UTF-8" method="post" novalidate="novalidate" class="dropzone">
  <div class="row">
     <div class="col-xs-10">
    <div class="col-xs-2" id="dropClickable">
        Drop Your File here...!!

I have already try this

var myDropzone = new Dropzone("div#myId", { url: "/file/post"});

but this way it will submit images on other path and I want to submit images only with a form with other form data.

Please help me!

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.30298 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO