07
Nov
2011
Contact Form 7: Get Parameter from URL into Form Plugin
There are times when using the Contact Form 7 WordPress plugin where I need to pass a parameter from the URL and into a hidden field into the form. This is great for passing things such as order numbers, selected packages, or even security information.
Installation
- Copy the getparam.php file into: /wp-content/plugins/contact-form-7/modules/
Usage
When editing a form in Contact Form 7, enter the getparam shortcode. There is only one valid parameter which is the name of the $_GET value.
[getparam value]
For example, if the URL is http://mysite.com/contact?ordernum=12345, the shortcode will be:
[getparam ordernum]
Then when building the response email, you can pass the value with [ordernum]




great! really! very thank you!