
Extension of Contact 7 Form
- November 4, 2015
- Leave a comment
While using Contact 7 Form plugin for ‘Request A Quote‘ form, your customers may inquire to get quotes for your custom products. For populating a form field with a dynamic value and leaving Contact 7 Form intact, you have to use Contact Form 7 Dynamic Text Extension plugin.
This plugin allows contact 7 form to populate dynamically generated values. After adding this extension, you will be able to see a dynamic text field option to add to your request form. When you add this dynamic text field, you can add a shortcode of your own choice to populate the field with a dynamic value.
For example, to add a specific product id to your request form, you have to create a dynamic field with id ‘prod_id‘ and value ‘get_prod_id. Following code will get the value from $_GET to populate the form field:
1 2 3 4 5 6 |
function get_prod_id_func() { $product_id = $_GET['product_id']; return $product_id; } add_shortcode('get_prod_id', 'get_prod_id_func'); |
User Comments