Skip to main content

Hidden fields: how to collect extra context with form submissions

Hidden fields are sent together with the form submission. Visitors do not see them and do not fill them in manually

A hidden field is a form field that is not shown in the widget. Claspo fills it automatically from the source you choose and adds it to the submission. For example, visitors may only see name, email, and phone number. The submitted data can also include a user ID, customer code, or product details.

When to use hidden fields

Claspo integrations already include many standard fields for Field mapping, such as submission date and time, site language, UTM tags, and marketing click IDs.

Use Hidden fields for custom website data you do not want to show in the form. For example, you can pass:

  • Product or page details, such as product name, category, ID, model. Say, in a car consultation form, a visitor may leave only an email or phone number. Your sales team can also receive the car model, year, VIN, or other details from the page where the form was submitted.

  • Logged-in user details, such as user ID, customer ID, or account ID. For NPS forms, surveys, or feedback widgets, this helps match a response to the right user or account.

  • Business-specific data, such as warehouse ID, recipient country, or campaign label. Use these values for routing, reporting, or follow-up.

This keeps the form short while sending extra context to Google Sheets, Webhooks, CRMs, email platforms, or other tools.

How hidden fields work

When a visitor submits a form, Claspo checks the hidden fields configured for the widget. If the value exists on the website at that moment, Claspo adds it to the submission. Depending on your setup, the value can appear in:

  • Claspo submissions;

  • lead details;

  • CSV exports;

  • webhook payloads;

  • Google Sheets;

  • connected integrations that support field mapping or custom fields.

If the value is missing, the widget still works as usual. The visitor can submit the form, but that hidden field value will not be sent.

How to set it up

Open the widget where you want to collect hidden data. In the right panel, look at the General tab and find the Hidden fields section. Click New hidden field.

Quick help

Can’t see this option? Click the canvas — the dark gray area around the widget. This will open the widget settings where Hidden fields are located.

In the panel that opens, set up the hidden field.

1. Enter the Field name

This name will be used in submissions and exports. Use short, clear names in lowercase with underscores, for example: user_id, customer_code.

Do not use standard contact field names, such as email, phone, first_name, or last_name. Hidden fields are custom fields and should not replace regular email, phone, or name fields in your widget.

2. Choose the Source

Select where Claspo should get the value from.

Choose the source based on where this data is stored on your website.

  1. Static value — use it when the same value should be sent with every submission from this widget. For example, a campaign label like black_friday_popup.

  2. URL query parameter — use it when the value is available in the page URL. For example, referral_name from ?referral_name=acme_corp.

  3. JavaScript variable — use it when your website sends data to Claspo through JavaScript. This can be useful for logged-in user data, customer segments, loyalty tiers, or subscription status. To learn how to send these values through GTM, check this guide.

  4. Local Storage — use it when the value is saved in the visitor’s browser local storage. This can work for visitor or session context your website already stores there.

  5. Cookie — use it when the value is saved in a browser cookie. This can work for tracking IDs, affiliate codes, promo codes, or visitor identifiers.

  6. Data Layer event — use it when the value exists in your website’s Data Layer. This is useful for product pages, cart data, e-commerce events, or other dynamic page context.

3. Enter the source details

This field changes depending on the source you choose. For example, you may need to enter a URL query parameter, a cookie name, a local storage key, a JavaScript variable, or a Data Layer path.

Click Save and publish the widget.

Send hidden fields to integrations

After you add hidden fields to a widget, you can send them to integrations that support Field mapping, custom fields, or webhook payloads.

1. Go to Integrations.

2. Add a new integration or open an existing one.

3. Find the Field mapping section.

4. Look for your hidden field in the list of available Claspo fields.

5. Map it to the matching field in the destination app.

6. Save the integration.

Some apps require you to create the matching custom field or property there first. If the destination platform does not support custom fields or field mapping, it may not be able to receive hidden field values.

Important notes

Hidden fields are not shown to visitors in the widget. They are not made for storing protected data. Do not use them for:

  • passwords;

  • private tokens;

  • payment details;

  • secret API keys;

  • any data that should stay only on your server.

For IDs or other personal data, check your privacy policy and the data protection rules that apply to your business.

Did this answer your question?