Contact form 7 dynamic text extension – populate form with title from previous page [closed]

There are two steps to this process:

1. Make sure you have your form set up correctly.

Your form should include the ‘dynamictext’ tag, and use the correct syntax as described on the plugin page. For example, you may want something like:

[dynamictext theproductname "CF7_GET key='foo'"]

This will set anything after the “foo” $_GET URL parameter (i.e. what comes after “foo=” in the URL http://mysite.com?foo=bar) to be prepopulated into that form field.

2. Set up your links

Every place where you link to this page, you must add the product page title to the link. So for example, if the form page is at http://foo.com/?page_id=58, you must add the page title as a parameter and instead link to:

http://foo.com/?page_id=58&foo=the%20bar%20of%20soap

This will cause whatever you put after “foo=” to appear in the form field defined with the shortcode.

Hope this helps!

Leave a Comment