URL Parameters
Form URL parameters were formerly known as Hidden fields.
You can use URL parameters to pass information to a typeform embedded on your site.
URL parameters are key-value pairs that contain pre-existing information about your respondents, which you can use to customize the formβs content and flow before they begin filling it out β for example, to gather more information about an individual respondent.
URL parameter values are pre-filled when respondents start the form and cannot be populated with information they enter during the form (variables handle that instead). Unlike query parameters, URL parameters provide specific information the form is expecting to receive, such as a first name for personalized greetings.
You can add URL parameter values manually to the formβs URL before sharing it, or use a customer relationship management system (like Salesforce) or a marketing automation platform (like Mailchimp) to populate them automatically. In either case, youβll configure URL parameters when you create your typeform.
You are responsible for any information you share with URL parameters. Recording and transmitting identifying information, like email addresses, is prohibited by some services (e.g., Google Analytics). Make sure the way you use URL parameters stays within the laws of your country and the terms and conditions of any service you are using with Typeform.
Pass URL parameter values
When you embed a typeform, you need to pass URL parameters into the embed itself. The embed will handle passing the values correctly in the typeform URL.
In JavaScript:
Or via HTML:
Pass values from host page URL
You can also configure the embed to read URL parameter values from the host page query parameters.
In JavaScript:
Or via HTML:
The typeform will load values from query params of you page where you embedded it. For example if your typeform is embedded at https://example.com/embed.html, you can use a URL with query params like this:
The embed will pass URL parameters full_name and email to the typeform. Query param age will be ignored.
Whatβs next?
Read more about how to pass callbacks.
Or check out what other open-source developers have created on the Community projects page.