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

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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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