Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
5.0k views
in Technique[技术] by (71.8m points)

wordpress - How to use value from a custom form tag

How can I read out and parse a value to contact form 7? Within my form I have following html code where I need to extract "value"

<input id="CF7MapLocationHidden" type="hidden" array="" name="" value="5;39.751123,10.349121">

Basically I need to pass "39.751123,10.349121" to a mail


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Contact form 7 will read all form fields into the form (by name) and subsequently place in the email if you call them by name. Just surround the field name with [ ].

If you do this in your HTML (as long as this code is appearing within the CF7 Form on the actual page.

<input id="CF7MapLocationHidden" type="hidden" name="my-field" value="5;39.751123,10.349121">

And then in your email tab on the Contact Form put:

[my-field]

It will send in your email.

ScreenShot


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...