Help with copying value from email field once that form is submitted to another form and email field

Hi All,

I need your help. Can you please tell me how to copy value from email field once that form is submitted to another form and email field? So I have first form with email field, and when user click on submit button it will lead him to second form and there I want to have automatically populated email field with email address that user already submitted.

I tried with with following custom code:

var email2= document.getElementById(“email-2”);
var email1= document.getElementById(“email-1”);
email2.val() = email1.val();

But no luck, as well similar option from stack overflow didn’t helped me.

Thank you in advance!