# Update db connection with wix form

**URL:** <https://forum.wixstudio.com/t/update-db-connection-with-wix-form/12635>\
**Category:** Ask the community\
**Tags:** wix-forms, code, question\
**Created:** [December 10, 2018, 6:17am UTC](https://forum.wixstudio.com/t/update-db-connection-with-wix-form/12635 "2018-12-10T06:17:56Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/system/32/86885_2.png) [@system](https://forum.wixstudio.com/u/system)\
**Post date:** [December 10, 2018, 6:17am UTC](https://forum.wixstudio.com/t/update-db-connection-with-wix-form/12635/1 "2018-12-10T06:17:56Z")

</div>

i need help with wix form, it seems to only create new records in db , and i need to knoew how to use it to update existing record too. thanks.

---

<div class="post-metadata">

**Author:** ![doron-alkalay](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/doron-alkalay/32/2887_2.png) [@doron-alkalay](https://forum.wixstudio.com/u/doron-alkalay)\
**Post date:** [December 10, 2018, 11:51am UTC](https://forum.wixstudio.com/t/update-db-connection-with-wix-form/12635/2 "2018-12-10T11:51:21Z")

</div>

Hi @arikr !

Wix Forms is a code-less app from our Wix App market, and as such I’d suggest contacting [Wix Support Center](https://support.wix.com/en/article/contacting-wix-support) as they know best regarding its behavior.

If you want to build your own form using WixCode I’d be more than happy to guide you through.  
Custom form built by WixCode can be updated and adjusted to your needs.

Doron.

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/system/32/86885_2.png) [@system](https://forum.wixstudio.com/u/system)\
**Post date:** [December 10, 2018, 12:16pm UTC](https://forum.wixstudio.com/t/update-db-connection-with-wix-form/12635/3 "2018-12-10T12:16:59Z")

</div>

Hi Doron, I will be happy to get help on this matter.

---

<div class="post-metadata">

**Author:** ![doron-alkalay](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/doron-alkalay/32/2887_2.png) [@doron-alkalay](https://forum.wixstudio.com/u/doron-alkalay)\
**Post date:** [December 10, 2018, 12:45pm UTC](https://forum.wixstudio.com/t/update-db-connection-with-wix-form/12635/4 "2018-12-10T12:45:09Z")

</div>

Well,  
You need a collection that represents the submissions DB.

In order to build your form, first add to a page enough (and relevant) input fields according to your form (if you have different fields in your collection that needs to be filled / images / etc.)

After you built (physically) the structure of the form, add a dataset to your page and connect between the inputs to the correct fields in your collection.  
If it’s your first time working with datasets I’d suggest to read [this](https://support.wix.com/en/article/wix-code-about-connecting-page-elements-to-database-content) article.

**Note** that in a page of ‘first submission’ a.k.a the first time that user fills the form, the dataset needs to be set to “write-only”.  
I pointed that because - if you want to give the user the opportunity to update their submission you can make another form page identical to the first and add a dataset that is set to be “Read - Write”.  
Dataset like this gives you the ability to edit the data that was submitted before by **Reading** it from the collection and **Re-Writing** over it.

Let me know how it goes,

Doron.

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/system/32/86885_2.png) [@system](https://forum.wixstudio.com/u/system)\
**Post date:** [December 10, 2018, 12:52pm UTC](https://forum.wixstudio.com/t/update-db-connection-with-wix-form/12635/5 "2018-12-10T12:52:38Z")

</div>

Thank you. I will follow your instructions.

---

<div class="post-metadata">

**Author:** ![francisojesussaezmun](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/francisojesussaezmun/32/7587_2.png) [@francisojesussaezmun](https://forum.wixstudio.com/u/francisojesussaezmun)\
**Post date:** [December 14, 2018, 8:26am UTC](https://forum.wixstudio.com/t/update-db-connection-with-wix-form/12635/6 "2018-12-14T08:26:45Z")

</div>

I have just gone through this. I was able to add content to the Collection via form, but not update via a form. I checked the Javascript Console on the live site and that is where I saw the error (User does not have permission). You need to go to the Collection when you are in the editor. Then click on the gear icon. Once you are there, you can define permissions for how the Collection can be edited and by whom. I hope this helps you! Good luck!
