Contact form 7 dynamic values

In Contact Form 7 you can dynamically set the values of your form input fields. Every Contact Form 7 input field supports the data-attribute.

The example above requires you to add a little bit of code to your theme, but there is also a much more straightforward way to set a value based on the querystring you add to your page URL with default:get.

Just add default:get to all fields you would like to set dynamically, like this:

<label>PACKAGE*</label>[text* package id:subject class:form-control default:get readonly]
<label>NAME*</label>[text* your-name id:name class:form-control default:get]
<label>E-MAIL*</label>[email* your-email id:email class:form-control default:get]
<label>MOBILE*</label>[text* your-mobile id:mobile class:form-control default:get]<label>DOMAIN</label>[text domain id:subject class:form-control default:get]
[submit id:submit class:button radius medium "Send"]

Now you can point people to this form with their information pre-filled in the URL, like this:

https://www.royaltechbd.com/contact-us/?your-name=S+M+Mehdi+Akram&[email protected]&your-subject=VPS Purchase

Leave a Reply

×

Your Cart

No products in the cart.
Start shopping

About Us

Royal Technologies is a System Integration house that supports Web Design, Web Hosting, Domain Registration, Search Engine Optimizing, IT Consulting, Remote or Telephone Support and Software Development. In simpler terms it’s an IT Company dealing in various aspects of implementation and maintenance of computerization. We have learnt from experience and have molded ourselves to be complete IT Company.

CONTACT US

Location

Copyright © 2008-2024 Royal Technologies. All rights reserved.
Development by Royal Technologies