Can someone help me understand what I am doing wrong? I am trying to create a link that autofills data based on its query parameters.
So I have one form on a page that on submit, sends the user to:
wixLocation.to("/race-entry-form-payment-slip?total=" + total + "&ParentFirstName=" + $w("#inputParentFirstName").value + "&ParentLastName=" + $w("#inputParentLastName").value + "&ParentEmail=" + $w("#inputParentEmail").value + "&StudentFirstName=" + $w("#inputStudentFirstName").value + "&StudentLastName=" + $w("#inputStudentLastName").value);
It sends them to the page, but doesn’t seem to fill in the information. Here is the code and UI I used:
I also tried doing:
let items = query.items;
let total = items[0]
let ParentFirstName = items[1]
//and so on...
…but that didn’t work either.
Could someone explain to me how to use the information from a link query? And set them as variables to use in code.
Thank you,
Mitchell