My site is about booking tours so once the customer has decided what he wants to book he clicks on “Book Now” and gets taken to a page with a form to complete. However, I need to keep track of which tour he selected so when he clicks on “Book Now” from a specific location, some specific info gets captured.
Therefore, how can I do this and provide the following:
1 . Display this info on the form to be filled in (see example from internet - circled in RED is the info that would be extracted from the tour page and IS NOT an input field)
2. Save this on my database, together with the user input, so I know what has been booked and by whom
Thanks
Victor
Hi GOS. The second link is exactly what I am looking for.
I tried to implement it exactly as shown but get an error (as per attached) and it does not work
Do you know what could be wrong?
Can no one assist with this please
Have you got data set up for title, price, class and days as the code for page 1 is setting all of that into Wix Storage to carry over to page 2.
Works all fine for me.
I am not sure I understand what you mean by have I got data setup for the elements in page 1 …
- I have added elements and changed their ID to title, price, class and days respectively
- then done the same on page 2 but changed the ID to title2, price2, class2, days2
- then the code is exactly the same as yours
- do I have to do anything to prepare for wixLocation? - i assume this is just syntax
- do I have to do anything to prepare for wix-storage? - I assume this is a predefined function
- do I have to create a database for this to work? - the text in page1 is NOT connected to any database … does it have to be?
- do I have to be published for this to work? I am not
- what other back-end things need to be in place? please treat me as having zero experience with WIX as I really don’t
Thanks for your help
Victor
You have enabled Corvid otherwise you would not have the code options on your page.
https://support.wix.com/en/article/getting-started-with-corvid-by-wix#step-2-enable-corvid-1
As for your code, the code is fine it is your submit button that is causing you the issue.
Make sure that it is not linked through the link settings for the element as it is linked through the code itself - as marked in green in pic below.
Also, make sure that the submit button has the onClick event handler function added to it in the properties panel and that the button id name is matched everywhere in your code - as marked in red in pic below.
As for your page name, you can call your page whatever you like, you just need to make sure that the page url is the same as what you have used in the wix location line of code.
https://support.wix.com/en/article/changing-your-page-url
Thanks for the help … I did all of that and it still was not working … then I noticed that the submit_click that I had typed in had a capital “S” where the button is a small “s”… that was the issue:

Works fine now … thanks for all the help 