简体   繁体   中英

How to email HTML inputs from page to user via a separate contact form

I have a number of HTML inputs that users control as part of a Javascript-run calculator (ie they input their age, income, etc. and the script spits out a number)

How can I use a separate contact form that dynamically retrieves the inputs and value from that calculation and sends to the user when they supply their email? I have the email form working via Contact Form 7. I just can't figure out how to access the variables on the webpage.

Would I have to create URL variables? Or can I retrieve data via their IDs?

I have figured out how to do what I want.

My HTML elements that Javascript updates already have unique IDs. Each form element also needs a unique ID, so that I can edit with my Javascript calculator function via:

document.getElementById('inputFieldID').value = document.getElementById('pageElementID').textContent;

I also used the Contact Form 7 Dynamic Text Extension so that I could give all of my form variables the [dynamichidden] tag. This way, I can include in my email many tags that never show up in the form.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM