Hello Everyone,
Hopefully, this should be my last step in website coding, and I'm stuck.
I've created a multi-step booking form using slideshow on a dynamic page.
On slide1: some info is entered by the user
On slide2: other infos are entered.
On Slide 3: It's a kind of Review page, where the user can review all the entries he entered AND some of the info that we're brought in from the dynamic page being connected to a dataset.
After reviewing, he can confirm and submit the info by clicking a button.
So basically, the last slide is a bunch of texts returning the data he entered in the user input field, and some texts returning some info from the dynamic page.
Is there a way to connect the #texts return on the last slide to my form submission dataset (not the #input fields themselves)?
When I tried to connect the text elements to fields in the data collection, and click submit button, it shows empty (probably because the submit button only takes the data from the input element and not the text element)
If you're asking if you can do it without code, I don't know.
But you can do it with code.
import wixData from 'wix-data'; let toInset = {}; $w.onReady(() => { $w("#submitbutton").onClick(event => { toInsert.name = $w("#input1").value; toInsert.additioanInfo = $w("#text1").text; //etc... wixData.insert("CollectionName", toInsert) .then(() => {/*show message*/}) }) })
Somthing like that