Drag and Drop makes multiple copies

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
Chris
User
Posts: 162

Drag and Drop makes multiple copies

Post by Chris »

We have a table with several fields for images, but using drag and drop for images makes duplicates across all file fields. If they are individually selected with the Browse function it works OK, not with drag and drop.


Webmaster
User
Posts: 9438

Post by Webmaster »

jQuery File Upload uses $(document) as default drop zone, so if you drag a file to the document, all fields will react. To distinguish, you can assign different drop zone to each field, e.g.

$("input[name=x_YourField1]").fileupload({ dropZone: $("#YourDropZone1") });
...

or you can set the drop zone as null to disable it, e.g.

$("input:file").fileupload({ dropZone: null });


Chris
User
Posts: 162

Post by Chris »

OK, so there should be a way to get each file input to have a dropZone linked to its parent div or row, that way it will work across all pages.


Post Reply