Prefill Form with URL parameters
This script will prefill your form fields, visibible or hidden, with parameters from the URL.
NOTE: This solution WILL appear in Google Analytics, so UNDER NO CIRCUMSTANCE should you use personally identifiable information as URL parameters. Failure to do so could cause the termination of your GA services.
The parameters must match the form field name.
(Inspect the HTML code of your page if you don't know the name. The form name is the text found inside the name="" part of the "<input>" code. For example: <input name="discountcode" etc>)
Example of URL parameters: http://www.visma.com/mypage?discountcode=123ABC&company=Visma
In this case, this URL will prefill the field named "discountcode" with the content "123ABC", and the field "company" with the content "Visma".
How to implement:
1. Add the pagescriptforms/formprefillfromurlparameters.js to the scripts area of your page
2. Note the field name(s) of the field(s) you want to prefill
3. Build your URL to prefill the content as shown in the example on the left.