Menu

URL prefill

Add query parameters to a URL and the form opens with those answers already filled in. Use it for campaign links, emails, and ads where you already know who the visitor is.

https://YOUR_WEBSITE.com/demo?<questionId>_<fieldName>=<value>

Where it works

Where the form livesPut the parameters on
Embedded with the Surface Tag (inline, popup, slideover, widget)The URL of your page
Surface form link (forms.withsurface.com/s/<formId>)The form link
Your own <iframe> without the Surface TagThe iframe src

1. Find the question ID

Open the form in the builder, select the question, and open the Behavior tab. Copy the Question ID.

2. Pick the field name

The part after the underscore depends on the question type.

Question typeParameterValue
Contact details<questionId>_<field> (see below)Any text
Short text<questionId>_inputAny text
Long text<questionId>_inputAny text
Dropdown<questionId>_selectedOption text, exactly as shown
Multi-select dropdown<questionId>_selectedOption texts, comma separated
Multiple options<questionId>_choicesOption texts, comma separated

Contact details fields

FieldField name
First namefirstName
Last namelastName
Full namefullName
EmailemailAddress
Work emailworkEmailAddress
PhonephoneNumber
CompanycompanyName
Job titletitle
WebsitewebsiteUrl
Company sizenumberOfEmployees
Company revenuecompanyRevenue
Street addressstreetAddress
Apt, suiteaptSuiteEtc
Citycity
Statestate
Zip codezipCode
Countrycountry

3. Build the URL

Join parameters with &. One contact details question can take several fields.

https://YOUR_WEBSITE.com/demo?abc123_firstName=Jane&abc123_emailAddress=jane%40example.com&def456_selected=United%20States

Replace abc123 and def456 with your question IDs.

Rules

  • Option values must match the option text exactly, including case. Values that match nothing are ignored.
  • A comma always separates options, so an option containing a comma cannot be prefilled.
  • URL-encode values: space is %20, @ is %40, + is %2B.
  • An email field that blocks personal emails ignores a personal address from the URL.
  • url, referrer, and cookies are reserved parameter names.
  • Other parameters (utm_*, gclid) are untouched and still attribute the visit.
  • Visitors can edit prefilled answers before submitting.

Not supported

  • Single choice questions (pick one buttons).
  • Multiple options questions on a Surface form link. They prefill only when embedded with the Surface Tag.