Skip to content

Instantly share code, notes, and snippets.

@be-mohand
Created March 23, 2023 10:24
Show Gist options
  • Save be-mohand/683a887c62c887de3064badfd31e1bb3 to your computer and use it in GitHub Desktop.
Save be-mohand/683a887c62c887de3064badfd31e1bb3 to your computer and use it in GitHub Desktop.
Redirect the vendor to a custom script so you can ask for more information about its profile or the listing.
// Add a redirect_url to the form to create an extra step
let redirectUrlInput = document.createElement("input");
redirectUrlInput.setAttribute('name', 'redirect_url');
redirectUrlInput.setAttribute('value', 'https://your-script-url.com');
redirectUrlInput.setAttribute('type', 'hidden');
document.getElementById('listingForm').appendChild(redirectUrlInput);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment