Duplicated Upload Button

Hi there,

I was hoping one of you might be able to help. I have been working on a form, where users can upload an image, and fill in description about that image.

However, I want them to be able to upload multiple images if they wish to. I have figured a script that duplicates the div with the specific field, and change the id, name and data-name of all the input elements as to not cause issue when submitting.

However, there is a recurring issue with the upload button. Despite them having a different name, id, etc. when i click on either the original or the duplicated button, the file gets uploaded on the first button (so however many duplicates I have, I can only upload one file).

Would someone know what the issue is?

Thank you,
Julie

https://preview.webflow.com/preview/world-sports-photography-awards?utm_medium=preview_link&utm_source=designer&utm_content=world-sports-photography-awards&preview=1174e9e8e07fdc19ef82f6a9f3bdbe3d&pageId=5db1b82f1271942262a7f4f0&mode=preview

(To find the form, go the page My Entry, and to the tab Your Images)

1 Like