The “other” page (or pages) needs to save its own URL like this:
session.setItem("page", wixLocation.url);
Then, when the page with the form is run, it retrieves the url like this:
let previousPageURL = session.getItem("page");
The “other” page (or pages) needs to save its own URL like this:
session.setItem("page", wixLocation.url);
Then, when the page with the form is run, it retrieves the url like this:
let previousPageURL = session.getItem("page");