Created
December 13, 2022 16:12
-
-
Save nocodesupplyco/00d957bcc1e76a7cbaafce4ae53d0988 to your computer and use it in GitHub Desktop.
Redirect Form on Submit and Pass Input Value to URL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(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