Этот плагин не тестировался с последними 3 основными выпусками WordPress. Скорее всего, он уже не поддерживается и может быть несовместим с текущими версиями WordPress.

Contact Form 7 Get and Show Parameter from URL

Описание

There are times when using the Contact Form 7 WordPress plugin where you need to pass a parameter
from the URL and into a hidden field or display it in the form. This plugin is great for passing things
such as order numbers, selected packages, or even security information.

Установка

  1. Go to the «Plugins» section of your WordPress admin panel
  2. Click «Add New» at the top
  3. Click «Upload» at the top
  4. Upload the included zip file
  5. Activate the plugin through the ‘Plugins’ menu in WordPress
  6. For getting a parameter as a hidden text field, use [getparam value]
  7. For getting a parameter to display as text, use [showparam value]

The above examples assume a URL such as http://mywebsite.com/contact?value=hello.
If you are using a different parameter such as order=hello, use [getparam order]

Часто задаваемые вопросы

How do I add a Hidden Field?

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]

How do I show a $_GET value on the form?

When editing a form in Contact Form 7, enter the showparam shortcode. There is only one valid parameter
which is the name of the $_GET value.

[showparam value]

For example, if the URL is http://mysite.com/contact?ordernum=12345, the shortcode will be:

[showparam ordernum]

You cannot pass a value to the response email using this method, to do that, you will also have to add a hidden field.

Отзывы

08.11.2016
Just works fine. Usage: 1. Create a form 7 as usual. 2. Then insert the form within your page: [contact-form-7 id="9999" title="Your Form"] 3. Then within form 7 FORM editor, you can use: [showparam productname] // this will just insert as text [getparam productname] // this will insert a hidden field which you can use later 4. Within form 7 EMAIL, you can use (along side with other form 7 code): Product name: [productname] Message Body: [your-message] You call the form within web browser like so: http YOURSITE/form/?productname=HelloWorld
30.09.2016
Just does the trick. You can get a $_GET value to check, for example, a key/mail consistency in an "unsubscribe form". Thanks
Посмотреть все 7 отзывов

Участники и разработчики

«Contact Form 7 Get and Show Parameter from URL» — проект с открытым исходным кодом. В развитие плагина внесли свой вклад следующие участники:

Участники

Журнал изменений

0.9.7

  • Fixed XSS issue, thanks Ryan Hellyer (https://geek.hellyer.kiwi/) for the heads up!

0.9.6

  • Update shortcode init for Contact Form 7 3.7.2

0.9.5

  • Release Contact Form 7 module as a plugin