Select Page

Opt-In Sample Form

Instructions for Use

Parameters for the URL query string on this form are:

  • first = First Name
  • last = Last Name
  • email = Email
  • optin = Opt-in

The Opt-in field would typically be hidden but I’ve left it unhidden on the sample form so that you can see how your URL inputs feed through to the form. Change any of the parameters in the URL to see how the fields prepopulate.

To add a space in your parameters enter “%20” between the words with no space around it (as shown between “sample” and “form” above).

To add multiple parameters (i.e. prefill multiple hidden fields (or even not hidden fields) use an “&” between the parameters like this:
https://builtwithgravity.com/opt-in-sample-form/?first=Jane&last=Doe&email=janedoe@youremail.com&optin=sample%20form

Note: you do not need to submit this form to see it in action, but if you do submit it, you will not be added to my mailing list. To join the mailing list, click here.