# Adding multiple attachments to a form submission before submitting it

**URL:** <https://forum.bubble.io/t/adding-multiple-attachments-to-a-form-submission-before-submitting-it/9418>\
**Category:** Need help\
**Created:** [January 10, 2017, 8:53am UTC](https://forum.bubble.io/t/adding-multiple-attachments-to-a-form-submission-before-submitting-it/9418 "2017-01-10T08:53:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![supernaturally](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/supernaturally/32/8307_2.png) [@supernaturally](https://forum.bubble.io/u/supernaturally)\
**Post date:** [January 10, 2017, 8:53am UTC](https://forum.bubble.io/t/adding-multiple-attachments-to-a-form-submission-before-submitting-it/9418/1 "2017-01-10T08:53:47Z")

</div>

I’d like to allow users to add multiple attachments to a form submission. In the form, they click the attachment button (the repeating group off to the left will display the pictures uploaded after they attach them):  
 ![](https://us1.discourse-cdn.com/bubble/original/2X/8/8e7ab3a6bb9eb3ff11c8889c4c195b60e8cba181.png)

The attachment button (above) creates a dropdown as shown here:

 ![](https://us1.discourse-cdn.com/bubble/original/2X/e/ef8a098da52550da496300f530c90fc82fae833c.png)

After the user clicks the “attach” button above, my app enters these images in a Thing called “Attachments”, but has no way of associating the Attachments with the form submission (the form will create an entry in a “Location” Thing) until they click this submit button to create a Location entry:  
 ![](https://us1.discourse-cdn.com/bubble/original/2X/a/ae40c7a498ce1b8c3d2b0fc65fafa0d3e4677462.png)

**_My question is_** : how can I attach multiple pictures to a form submission before submitting it (i.e. before creating a Thing entry to which the attachments can be associated)?

---

<div class="post-metadata">

**Author:** ![andrewgassen](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/andrewgassen/32/44248_2.png) [@andrewgassen](https://forum.bubble.io/u/andrewgassen)\
**Post date:** [January 10, 2017, 12:03pm UTC](https://forum.bubble.io/t/adding-multiple-attachments-to-a-form-submission-before-submitting-it/9418/2 "2017-01-10T12:03:17Z")

</div>

You could create a field on the user to store the uploaded images, then remove them after the attachment is created. It’s basically a holding area that is only populated while editing the attachment entry.

---

<div class="post-metadata">

**Author:** ![supernaturally](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/supernaturally/32/8307_2.png) [@supernaturally](https://forum.bubble.io/u/supernaturally)\
**Post date:** [January 10, 2017, 7:28pm UTC](https://forum.bubble.io/t/adding-multiple-attachments-to-a-form-submission-before-submitting-it/9418/3 "2017-01-10T19:28:03Z")

</div>

That did the trick, thank you @potentialthings. I set it up so that it deletes the field on the user if they click the “x” and also when the reload the form (assuming they did not click the x and clicked outside of the popup ) so that any rougue attachments are deleted when the form is loaded.

---

<div class="post-metadata">

**Author:** ![supernaturally](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/supernaturally/32/8307_2.png) [@supernaturally](https://forum.bubble.io/u/supernaturally)\
**Post date:** [January 10, 2017, 9:14pm UTC](https://forum.bubble.io/t/adding-multiple-attachments-to-a-form-submission-before-submitting-it/9418/4 "2017-01-10T21:14:28Z")

</div>

Quick question on deleting the scratch. Bubble is giving me an error “To delete should be anything saveable but right now it is a file.”  
 ![](https://us1.discourse-cdn.com/bubble/original/2X/9/959517f4515558802ad56a0879dfc5956e5df11e.png)

Does deleting a thing not apply to file uploads?

---

<div class="post-metadata">

**Author:** ![scottb50](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/scottb50/32/9334_2.png) [@scottb50](https://forum.bubble.io/u/scottb50)\
**Post date:** [February 15, 2017, 6:23pm UTC](https://forum.bubble.io/t/adding-multiple-attachments-to-a-form-submission-before-submitting-it/9418/5 "2017-02-15T18:23:45Z")

</div>

did this work out?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2847faa74692c2ffa5d939d3dc3724cdd060d247.png) [@system](https://forum.bubble.io/u/system)\
**Post date:** [March 21, 2017, 8:54am UTC](https://forum.bubble.io/t/adding-multiple-attachments-to-a-form-submission-before-submitting-it/9418/6 "2017-03-21T08:54:01Z")

</div>

This topic was automatically closed after 70 days. New replies are no longer allowed.
