How to pre-fill and hide form field data

For a capture widget containing form fields, you can pre-fill and hide fields as required. 

The form pre-fill option enables you to input values for system and custom fields, such as a person’s name or email address, to the form from values in the URL parameters.

The hide field option enables you to collect a person’s information (such as by pre-filling the field data with values from the URL parameters) but keep the field hidden from them. The hidden field data will be sent along with data from visible fields when the person submits the form.

You can also configure a form to automatically reduce (by hiding) the number of fields a customer needs to populate when the field values are already known. For example, you can configure a form to exclude the person’s email address and name when these values already exist for the person in your CDP. This works by using session cookie data to recognise the person completing the form.


Create a capture widget with pre-filled and hidden fields

To set this up, create a capture widget that contains form fields. This can be a widget that you create from scratch and add form content to (such as a popup or takeover type widget), or one of our embeddable form templates.

In this example, we have a popup widget announcing a webinar that requires customers to input their email address (at least) to receive access.

Example popup widget with visible and hidden fields

In addition to the required email field, you can add fields to collect information about the person registering for the event, where you don’t already have that data. You can also automatically remove fields from the form where information is already known, such as the person’s name.

In this example, the First name and Last name fields are configured to be pre-filled from the URL parameter, and the Hide field if value already exists for known contacts option is selected.

This means that for people who don’t exist in your CDP, or their first and last name fields are not populated in your CDP (based on their email as an identifier), the field will be pre-filled and shown to them. However, if the person is known in your CDP (with the first and last name field values populated), those fields will be excluded from the form (because we already have that data).



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



In the same capture widget, for market data, we want to collect information such as the person’s postal code or the name of the plan they are on. So, we will collect this field data from the URL, but will not show the fields to the person.

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

Configure form field pre-fill via the URL 

When you select to pre-fill a field value via the URL, you need to configure your website’s JavaScript (or use other means) to append the field and value as a query parameter to the web page’s URL (e.g. <https://www.workshops.com/form?str::postal=90210>). The capture widget will then be able to pull that field and value (<postal=90210>) from the URL and include it in the form submission sent to Ortto.

A field’s ID (e.g. <str::postal>) which you append to the URL can be found next to the field’s name in the Edit field popup within the capture widget configuration (see above for example), or in your account at Settings > Customer data > Fields.


About Tracked forms

For a Tracked form-type capture widget, if you have configured your form to include hidden fields then these will be recognised when you import your form data into Ortto. You can then map the hidden fields to Ortto fields, and the hidden field data will be included when form submissions are sent to Ortto. 

There are no pre-fill or visibility settings in Ortto for tracked form fields, because the form design and validation is handled on the form itself and is up to you to configure; we simply track the form submissions.