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

closed as off-topic by birgire, kaiser Jul 28 at 14:31

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.

2 Answers 2

Try using jQuery for this, something like

<?php $name = $_GET['name']; ?>
<script type="text/javascript">
$(document).ready(function(){
var yourget = '<?php echo $name; ?>';
$('input[name="nameofyourfield"]').val(yourget);
)};
</script>
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

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

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