I'm looking to improve the contact form on our e-commerce site so that it includes the page URL that the enquiry was submitted from.
I can retrieve the page URL using "wixLocation.url" and then store this in a text box (See below). But, I can't seem to link this to my custom contact form created with "User Input" fields. If I switch the text field to a user input field, the code below no longer works ("'text' does not exist on "contactUrl""). And if I use a simple text field, it isn't then submitted to the database.
let url = wixLocation.url
$w("#contactUrl").text = url
Any help would be greatly appreciated.