There are two forms. I am trying to retrieve the email address entered from whichever form is filled out. The following code only returns “regsubmit_btn or regsubmit_popup”.
function () {
var regsubmit_btn = document.getElementById('reg_email').value;
var regsubmit_popup = document.getElementById('reg_email_popup').value;
if (regsubmit_btn)
return reg_email;
else if (regsubmit_popup)
return reg_email_popup;
else
return "email blank";}
@demetriusmcclain for future reference, when you post code in the forum, you need to format it. To do so you can either select all the code and click the </> button, or type 3 backticks ``` on a separate line both before and after the block of code.