is there a way to store data from one form then submit it with another?

I am building a contact form that will send an email containing the data inputed. But it is suppose to contain data that has been inputed in a form which submit button is also a CTA that shows the contact form. Is there a way to store data written by user into the first form to then add it to the data written into the contact form ? Basicly the first form is a calculator and on user click it shows the result next to contact form. And upon filling that contact form the email needs to contain the info from calculator as well as the info from contact form.