This code allows you to auto-populate a Webflow form on a different page with a URL parameter. It is an extension of an original code posted on the Webflow Forum that covers form email fields, text fields as well as select dropdowns and textarea. The URL parameters may be passed as lowercase variables such as ?name=glenn (becoming 'Glenn') and then subsequent queries to the form are followed by an &. A full URL string would be something like:-

https://yourdomain.co.uk/contact?dropdown=selectoption&name=glenn&email=webflow@slickmedia.co.uk&enquiry=test%20enquiry

So we use the following snippet:-

Remember that you must give your respective form elements the correct ID to target. For example, the ID for the email is 'email' (case is important) and that is shown in the URL query 'email='. Typically the best way to target a specific form element is also by its ID (aka 'name') such as textarea[name=fieldID].

If you have a space in your query it will automatically be replaced with a %20 and the code will, in turn, replace this with a new space.