I created website for 3d print that have submit form for client to send their file and contact info then send to database, when click submit button it will prompt a lightbox that has completion words and information pulled form the database that they just put in as a confirmation and re-check for them.
so i link the input field to database and link some text boxes on the lightbox to that database and link the submit button to prompt to the lightbox which make it somewhat dynamic.
the problem is, the info it show on the light box is a previous input, like, the submit button hasn't send the current input so when when it prompt the lightbox it can only pull from the previous one. and when change the jump trigger with dataset connect function it work with very show respond, but only on preview, not in the real site.
how do I solve this though ?
and I want to make the submit button able to generate a simple numeric code to use as order ID to help communicate with client, how do I make that though ?
my site that i'm working on
https://www.protorepublic.com/
Hi,
From what I understand, you are trying to populate the data that displays in the lightbox with some data that was submitted to the database collection from the form that is on the site page.
There are a few ways you can do this.
One way is creating a query.
In order to populate the data that was submitted to the database in the lightbox, I can suggest creating a query in the lightbox code that looks for the the information that was submitted into the database collection for the form, and populate the data into the text elements accordingly.
Another way to populate the input data to the lightbox after it is submitted is to use the wix-storage API. (You will just have to make sure the information from the form is successfully being stored into your database collection)
You can use the wix-storage API to store the values that were submitted to the form to a variable and then populate the stored data into the lightbox.
Another efficient way to populate the data that was just submitted into the database into the lightbox is to use the data hooks. You can create a data hook that populates the data into the lightbox after the information is inserted to the database by using the wix-window API.
Regarding generating an order ID when the submit button is clicked, you can create a random number generator that was discussed in the following discussion here.
Best Regards,
Edward