How to pre-fill and hide form field data

Overview

If your capture widget includes a form, you can pre-fill and hide fields to streamline the experience.

  • Pre-fill fields: Automatically fill in known values (like name or email) using URL parameters.
  • Hide fields: Use pre-filled values without showing them to the user—these will still be submitted with the form.
  • Auto-reduce fields: Hide fields like name or email if Ortto already knows the user (based on session cookie data).

This helps make forms faster and easier for your users to complete.


Create a capture widget with pre-filled and hidden fields

To get started, create a capture widget that includes form fields. You can:

  • Build one from scratch (e.g. a popup or takeover), or
  • Use one of Ortto’s embeddable form templates

EX: A popup widget promoting a webinar, where users need to enter their email address to get access.

Example popup widget with visible and hidden fields.

Along with the required email field, you can add extra fields (like first name and last name) to collect info you don’t already have.

You can also choose to hide fields if that information already exists in your CDP.

EX: In this setup, the First name and Last name fields are:

  • Pre-filled using URL parameters.
  • Set to hide if the values already exist for a known contact (matched by email).

So, if a contact is new or missing name data, the fields will show pre-filled. If the contact is already known in your CDP with name details, the fields will be hidden.

Example visible field with pre-fill from URL, but excluded if already known.

If you want to gather extra info like a person’s postal code or plan name, you can collect this data from the URL without showing the fields in the form.

Just pre-fill the fields using URL parameters and set them to hidden—they’ll still be submitted with the form, even though the user won’t see them.

Example hidden field with pre-fill from URL, but excluded if already known.

Configure form field pre-fill via the URL 

To pre-fill a form field via the URL, you’ll need to:

  1. Update your website’s JavaScript (or use another method) to add the field and value as a query parameter in the URL.
    • Example: https://www.workshops.com/form?str::postal=90210
  2. Ortto will then pull the value (e.g. 90210) from the URL and include it in the form submission.

You can find the field’s ID (e.g. str::postal) in the Edit field popup in the widget settings, or under Settings > Customer data > Fields in your Ortto account.

NOTE: To pre-fill the phone number field with a country code, use this format in your URL:

https://www.workshops.com/form?phn::phone=+[country code]-[phone number]

Example: For an Australian number (+61) like 412345678, your URL would be:

https://www.workshops.com/form?phn::phone=+61-412345678


About Tracked forms

If you're using a Tracked form widget and your form includes hidden fields, Ortto will detect them when the data is imported.

You can then map these hidden fields to your Ortto fields, and their values will be included with each form submission.

NOTE: Tracked forms don’t support pre-fill or visibility settings in Ortto. Since the form is designed and validated on your website, it’s up to you to manage how fields appear or behave. Ortto simply tracks the submissions.