How do i grab data from a post and insert it into the form, So when the form is sent it will have that post name and image from that page that the form was sent on?

Basicly I have a get a quote button and i want them to click that and ask about the product by inputting field by contact form 7, but I want the name of the product and image of the product to be automatically inserted in to the contact form so they just needs to fill out name and email and message field and the name of the product any image of the product is already set up to be sent.

closed as off-topic by Pieter Goosen, kaiser Jul 24 '14 at 8:43

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.


Contact Form 7 has built in Special Mail Tags:


If you can insert the Contact Form into "The Loop", Contact Form 7 will automatically pull this information. If it is indeed in the loop, you can use Contact Form 7 - Before Send Mail Hook - get the post ID from the form, then use the post ID to grab the image and send it along as an attachment.


I think you can do this, or at least the text part (not sure about the image) using the plugin Contact Form 7 Dynamic Text Extension

There's a good blog post explaining how to use it here.

We followed those instructions and (apart from having to ensure CF7 and CF7DTE are in sync and both running the very latest versions) it worked just as promised.

Not the answer you're looking for? Browse other questions tagged or ask your own question.