# How to load data from one data collection, auto filled into user input, & submit into another database?

**URL:** <https://forum.wixstudio.com/t/how-to-load-data-from-one-data-collection-auto-filled-into-user-input-submit-into-another-database/20474>\
**Category:** Ask the community\
**Tags:** question, code\
**Created:** [August 5, 2018, 3:24am UTC](https://forum.wixstudio.com/t/how-to-load-data-from-one-data-collection-auto-filled-into-user-input-submit-into-another-database/20474 "2018-08-05T03:24:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![thecandymachinefreel](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/thecandymachinefreel/32/5707_2.png) [@thecandymachinefreel](https://forum.wixstudio.com/u/thecandymachinefreel)\
**Post date:** [August 5, 2018, 3:24am UTC](https://forum.wixstudio.com/t/how-to-load-data-from-one-data-collection-auto-filled-into-user-input-submit-into-another-database/20474/1 "2018-08-05T03:24:41Z")

</div>

Heres what I am trying to do.

1. On a dynamic product page. Customer picks a product - “Product\_s001”. Clicks on Order Now button.
2. Goes to another page with a form, on the first user input value box, it needs to be autofilled with that specific product name which is - Product\_s001.
3. Customer fills the whole form, and click submit, data is submitted to"SubmissionDatabaseCollection".
4. So in this case I can see which product the customer ordered.

Problem I am facing now is that on the next page, I dont know how to auto fill the data into the user input for submission.

---

<div class="post-metadata">

**Author:** ![\_or](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/_or/32/1004_2.png) [@\_or](https://forum.wixstudio.com/u/_or)\
**Post date:** [August 5, 2018, 9:39am UTC](https://forum.wixstudio.com/t/how-to-load-data-from-one-data-collection-auto-filled-into-user-input-submit-into-another-database/20474/2 "2018-08-05T09:39:11Z")

</div>

Hi,

You can save the data about the product in the session storage, more information about it [here](https://www.wix.com/code/reference/wix-storage.html) .  
Then you can set the input from the storage, for example:

```javascript
$w(#input1).value = session.getItem("data");

```

In order to submit the data you insert automatically you can use setFieldValue to set the relevant fields or you can write an insert function for the submit button click event.

Good luck 🙂

---

<div class="post-metadata">

**Author:** ![thecandymachinefreel](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/thecandymachinefreel/32/5707_2.png) [@thecandymachinefreel](https://forum.wixstudio.com/u/thecandymachinefreel)\
**Post date:** [August 5, 2018, 3:20pm UTC](https://forum.wixstudio.com/t/how-to-load-data-from-one-data-collection-auto-filled-into-user-input-submit-into-another-database/20474/3 "2018-08-05T15:20:21Z")

</div>

Hello Thanks for the reply.  
I am not very familiar with coding, if theres a step by step on how to do this, I would really appreciate it.  
As I can only find explanations but not tutorials.  
But if it’ll take too much time then its okay.

Thanks a lot.  
Best Regards,  
Ryan

---

<div class="post-metadata">

**Author:** ![thecandymachinefreel](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/thecandymachinefreel/32/5707_2.png) [@thecandymachinefreel](https://forum.wixstudio.com/u/thecandymachinefreel)\
**Post date:** [August 5, 2018, 4:02pm UTC](https://forum.wixstudio.com/t/how-to-load-data-from-one-data-collection-auto-filled-into-user-input-submit-into-another-database/20474/4 "2018-08-05T16:02:00Z")

</div>

I don’t know how to get this code working. I already have #input1 in my page. Can you tell me what am i doing wrong ? Sorry i am a newbie.

 ![](https://us1.discourse-cdn.com/wix/original/3X/7/b/7bac7dbee5f29f79ade71449d11124b539773c8a.png)

---

<div class="post-metadata">

**Author:** ![roi-bendet](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/roi-bendet/32/1283_2.png) [@roi-bendet](https://forum.wixstudio.com/u/roi-bendet)\
**Post date:** [August 8, 2018, 1:02pm UTC](https://forum.wixstudio.com/t/how-to-load-data-from-one-data-collection-auto-filled-into-user-input-submit-into-another-database/20474/5 "2018-08-08T13:02:03Z")

</div>

Hi,

```javascript
$w('#input1').value = session.getItem('data');

```

Roi.

---

<div class="post-metadata">

**Author:** ![speciX](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/specix/32/85971_2.png) [@speciX](https://forum.wixstudio.com/u/speciX)\
**Post date:** [December 17, 2023, 1:41pm UTC](https://forum.wixstudio.com/t/how-to-load-data-from-one-data-collection-auto-filled-into-user-input-submit-into-another-database/20474/6 "2023-12-17T13:41:09Z")

</div>

I have same issue Please tell me how to do with out code
