Have form load with certain data

I have an ‘Inquire About Product & Pricing’ button on a dynamic product page. When the user clicks it takes them to a Free Quote form. How would I make that form load with the style name & color name that user is inquiring about or from the previous product page? Thanks

1 Like

Have a look at using Wix Storage to save the data that you want and then recall it on the needed page.
This will be the easiest option for yourself as you don’t have to save anything and it is all stored on the users side with the use of setItem and getItem.
https://www.wix.com/corvid/reference/wix-storage.html

Otherwise, you can save it to a dataset and then recall it again when you need to by using getCurrentItem, setFieldValue or setFieldValues and save functions. This will give you an autofill type of input on your form).
https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#getCurrentItem
https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#setFieldValue
https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#setFieldValues
https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#save

1 Like

I released a tutorial video last week that shows how to perform this logic. The tutorial shows how to implement it using a Wix Stores app ----- BUT ------ it is basically the same concept because we are taking information from a dynamic item page and then filling it into the form.

You can watch it here:
https://www.youtube.com/watch?v=TSDOUquQxsU

Thanks, Code Queen I followed video, but the getProduct on my product page is giving an error that says ‘getProduct’ does not exist on ‘#page1’, is it because it’s a dynamic page and not on a store product page? How can I do this if that’s the problem? The rest of the code on the form page and backend show no errors. If you are willing to help me, just let me know what you need to see and I’ll get it. Thanks.