So I have a "quick register" kind of widget in my footer with only first and last name text boxes. I also have a button that redirects to the actual registration page after clicked. My intentions are to carry the information inputted into the text boxes over and fill the matching first/last name text boxes on the registration form.
document.querySelector(".footerSignUp").onclick = function () {
var footerFirst = document.querySelector(".footerFirstName").value;
var footerLast = document.querySelector(".footerLastName").value;
alert(footerFirst,footerLast);
location.href = " http://localhost/wordpress/my-account/register/ ";
};
<input type="text" class="input-text footerFirstName" name="billing_first_name" value="Firstname" />
<input type="text" class="input-text footerLastName" name="billing_last_name" value="Lastname" />
<input type="button" value="Sign-up" class="footerSignUp" />
Thanks