Skip to content

Instantly share code, notes, and snippets.

@nocodesupplyco
Created December 13, 2022 16:12
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nocodesupplyco/00d957bcc1e76a7cbaafce4ae53d0988 to your computer and use it in GitHub Desktop.
Save nocodesupplyco/00d957bcc1e76a7cbaafce4ae53d0988 to your computer and use it in GitHub Desktop.
Redirect Form on Submit and Pass Input Value to URL
$(function() {
//run when form submits - ID must be on the <form> element!
$("#your-form").submit(function(event) {
//store email input value
var emailValue = $("#email").val();
//redirect to sign up
window.location.replace("example.com/signup?email=" + emailValue);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment