Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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!

share|improve this question

closed as off-topic by birgire, Pieter Goosen, Johannes Pille, s_ha_dum Oct 3 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.

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer
    
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.