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

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.

Hi,

You can save the data about the product in the session storage, more information about it here .
Then you can set the input from the storage, for example:

$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 :slight_smile:

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

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.

Hi,

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

Roi.

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