Title: [Plugin: Contact Form 7] setting default form value programmatically
Last modified: August 19, 2016

---

# [Plugin: Contact Form 7] setting default form value programmatically

 *  [thardy99](https://wordpress.org/support/users/thardy99/)
 * (@thardy99)
 * [16 years, 12 months ago](https://wordpress.org/support/topic/plugin-contact-form-7-setting-default-form-value-programmatically/)
 * I am trying to use the custom fields to pass the subject value to the form. But
   the form value field escapes the < and > in the php string…
    value=”<? print 
   $custfield; ?>”
 * I have tried this in the generate tag window, tried scripting it in the form 
   window, and tried in the mail window. I know the custom field value is available
   because I can echo it from the loop with:
    <?php $custfield = get_post_meta(’
   19’, ‘myinfo’, true); echo $custfield;?>
 * New to WordPress, not new to scripting.
    Thanks, Teresa

The topic ‘[Plugin: Contact Form 7] setting default form value programmatically’
is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [thardy99](https://wordpress.org/support/users/thardy99/)
 * Last activity: [16 years, 12 months ago](https://wordpress.org/support/topic/plugin-contact-form-7-setting-default-form-value-programmatically/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
