Despite there's some documentation, there are very few real examples on how to use it.
For example: I want to include Dropzone inside my existing form that adds a product with title, description and photos.
Dropzone itself works as a form. It would be nice to use Dropzone just to preview and validate image type and size, but let the main form submit all the data. How should I do it?
This would be the idea (however, I shouldn't include a form inside a form):
<form action="products/add.php" method="POST" class="form-horizontal" role="form">
<div class="form-group">
<legend>Add product</legend>
</div>
<label for="title">Title</label>
<input type="text" name="title" id="input-title" class="form-control">
<label for="description">Description</label>
<input type="text" name="description" id="input-description" class="form-control">
<form action="/file-upload" class="dropzone" id>
<div class="dropzone-previews"></div>
</form>
<div class="form-group">
<div class="col-sm-10 col-sm-offset-2">
<button type="submit" class="btn btn-primary">Submit</button>
</div>
</div>
</form>
Please try the following. You have to "load" dropzone programmatically as the creator explains here