Pre-filling and Hiding Fields in OneTrust Hosted and Embedded Web Form Collection Points
Once you have created and built your OneTrust Hosted or Embedded Web Form Collection Point, you can decide which content fields are pre-filled or hidden for the data subjects interacting with your web forms, facilitating the data collection process. You can easily configure pre-filled and hidden fields using a query parameter in the URL.
Things to Know
Pre-filling and Hiding functionalities can be enabled for OneTrust Hosted and Embedded Web Form Collection Points. The following table details each functionality and the corresponding applicable fields.
|
Functionality |
Description |
Applicable Fields |
|---|---|---|
|
Pre-filling via Query Parameter
Note:
Values passed in the URL must be URL-encoded, as shown below:
|
You can pre-fill web form fields that will include previous entered information by adding a query parameter at the end of the URL.
For example, a query parameter of [Communication Channel = Text Message] will pre-fill the field with the label "Communication Channel". |
The pre-filling functionality via Query Parameter is applicable to the following content fields:
|
|
Pre-filling via JavaScript
Note:
Pre-filling via JavaScript code is only applicable to OneTrust Embedded Web Form Collection Points. |
You can pre-fill web form fields that will include previously stored known data via JavaScript. For more information, see Embedded web forms methods and events in the OneTrust Developer Portal. |
The pre-filling functionality via JavaScript is applicable to the following content fields:
|
|
Pre-filling via Remembered Identifiers
Note:
Pre-filling via Remembered Identifiers is only applicable to OneTrust Embedded Web Form Collection Points.
Note:
A CMP license is required to use this functionality. |
You can pre-fill web form fields that will include previous stored known data about a user's identity by remembering data subject identifiers. For more information, see Configuring OneTrust Embedded Web Form Collection Point Settings. |
The pre-filling functionality via Remembered Identifiers is applicable to the following content fields:
|
|
Hiding |
You can hide web form fields when using any of the pre-fill functionalities enabling the Hide Form Field setting on the Builder tab.
Note:
Take into consideration the following scenarios when pre-filling via query parameter if a query parameter is not provided:
|
The hiding functionality is applicable to the following content fields:
|
These functionalities depend on the admin to provide an accurate query parameter on the URL to ensure that unexpected values are not recorded in the receipts, as incorrect query parameters can result in incorrect values being recorded for the data subject’s profile.
Validation of data applies to hidden and visible fields. If data is invalid, the field will not be pre-filled remaining empty, or it will take the default value.
Use Cases
The following are particular cases of the pre-fill functionality that present some variations:
|
Configuration |
Outcome |
|---|---|
|
Purposes with Purpose Preferences |
If a Purpose is pre-filled as checked and it contains required Purpose Preferences, these Purpose Preferences have to be filled. |
|
If a Purpose Preference is pre-filled and the Purpose is not required, the Purpose will remain as not required.
Note:
If a Purpose Preference is intentionally checked, the Purpose will become required. |
|
|
Country / State content fields |
Country and State content fields should be pre-filled using ISO codes. |
|
Date content fields |
Date content fields should be pre-filled using ISO codes (YYYY-MM-DD). |
|
Phone Numbers |
Phone Numbers have to be filled as shown in the following example (adding %2B instead of the + sign at the beginning). If the phone number is +1 123 456 7890, then the query parameter passed should be: ?Mobile=%2B11234567890. |
|
Visibility Rules |
Pre-filled fields will trigger those visibility rules to which they are associated. |
Additional Resources
For more information on how to manage OneTrust Hosted and Embedded Web Form Collection Points, see the following articles: