I'm thinking to use Contact Form 7 to create a simple enquiry form like : name, phone, email.

This enquiry form will be displayed on every portfolio page.

What I want to do is to retrieve also from the user the page title from where he submitted the enquiry, because I will have more than 50 posts and I don't want to create 50 different forms for each post.

Any suggestions on how to achieve this ? Thank you!

closed as off-topic by birgire, Pieter Goosen, Johannes Pille, s_ha_dum Oct 3 '14 at 16:08

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

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


Add a hidden field to the form like this:

<input type="hidden" name="page_title" value="<?php the_title_attribute(); ?>" />

This will send the current posts’s title.

  • I didn't test it, but this should do the trick! Thank you! – agis Jan 10 '13 at 1:30

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