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 using contact form 7 plugin in wordpress,
i have generate text field like this:

 [textarea your-message 25x3 "<?php  print_r($_POST); ?>"] 

i have to set value of input name which comes from another form with POST method. but it's not worked, instead of input tag, it displays ; ?>"] there is any solution?

share|improve this question
add comment

2 Answers

Try using jQuery for this, something like

<?php $name = $_GET['name']; ?>
<script type="text/javascript">
var yourget = '<?php echo $name; ?>';
share|improve this answer
this will basically store the variable from php in jquery and then set it as value for your input field. –  mircea Jan 20 '12 at 8:18
add comment

It seems that contact form 7 doesn't support php or js code in template. Try plugin Contact Form 7 Dynamic Text Extension, it hasn't been updated in over 2 years, but it works on latest WP version with latest version of Contact Form 7. More details how to use plug in.

share|improve this answer
add comment

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.