How to Add Hidden Fields to Google Forms
Hidden fields let you pass data into a form submission without the respondent seeing the field. The value is submitted silently alongside the visible answers — perfect for tracking sources, campaign IDs, user IDs, or any metadata you need on the backend.
Hidden fields work with both the Embed in a web page and Share the link options.
How to configure hidden fields
The hidden fields editor is available in the Share tab under both modes — Embed in a web page and Share the link. The steps below are the same regardless of which mode you choose.
Open the Share tab
In the CustomGForm dashboard, open the Share tab for your form. You can use either mode:
- Embed in a web page — hidden field IDs are written into the embed code.
- Share the link — hidden field IDs are appended to the URL as query parameters.
Customize fields (optional)
Under Step 1 — Customize fields, scroll to the Hidden fields section:
- Click Add new row.
- Select the field you want to hide from the dropdown.
- The field will no longer be visible to respondents when they open the form.
- Repeat to hide multiple fields.
If a hidden field is marked as required in Google Forms, you must also pre-fill it with a value in the Pre-fill fields section above — otherwise respondents won't be able to submit the form. The dashboard shows a red warning when this happens.
Pre-fill fields with values
Hidden fields are most useful when combined with pre-filled values. After hiding a field, scroll up to the Pre-fill fields with values section:
- Click Add new row.
- Select the same field you just hid.
- Enter the value you want to submit silently (e.g.
facebook,newsletter-2024, or a user ID).
This way, the respondent never sees the field, but the value is submitted with every response.
Copy the link or embed code
The output updates in real time as you configure hidden and pre-fill values:
- Share the link — the generated URL includes
?hidden=and?prefill=query parameters:https://customgform.com/form/FORM_ID?hidden=FIELD_ID;FIELD_ID_2&prefill=FIELD_ID=VALUE - Embed in a web page — the embed snippet includes
data-hidden_fieldsanddata-prefill_fieldsattributes with the same values.
Click Copy link (or copy the embed code) and use it.
[!NOTE] Hidden field IDs are appended as
?hidden=fieldId;fieldId2(semicolon-separated). If you also pre-fill those fields, both parameters appear in the URL:?hidden=...&prefill=....
Use cases
- Source tracking — create different links for different channels (
source=facebook,source=newsletter,source=linkedin) to know where submissions come from. - User IDs — pass a logged-in user's ID from your application to link the submission to their account.
- Campaign IDs — attach a campaign identifier for marketing attribution.
- A/B testing — pass a variant identifier to track which version of a page the respondent saw.
- Internal routing — include a department code or region tag so submissions can be auto-sorted.
URL format explained
Hidden fields and pre-fill values are encoded as query parameters:
| Parameter | Format | Example |
|---|---|---|
hidden | Semicolon-separated field IDs | ?hidden=501104403;501104404 |
prefill | Semicolon-separated fieldId=value pairs | ?prefill=501104403=facebook |
A complete example combining both:
https://customgform.com/form/abc123?hidden=501104403;501104404&prefill=501104403=newsletter&501104404=2024-campaignTips and best practices
- Always pre-fill required hidden fields. If a field is required in Google Forms and you hide it without providing a value, the form can't be submitted. The dashboard warns you about this.
- Create separate links per channel. Generate one link with
source=facebookand another withsource=emailso you can compare conversion rates. - Combine with pre-filled fields. Pre-fill + hide is the most common pattern — the respondent doesn't see the field, but the value is tracked in your responses.
- Use webhooks to forward hidden data. If you need to push submission data (including hidden fields) to a CRM or analytics tool, set up a webhook.
Troubleshooting
Hidden field still shows on the form
- Make sure the field ID matches. Click Refetch Google Form in the dashboard after making changes in Google Forms.
- Confirm you saved the settings and refreshed the form preview.
Form can't be submitted — required field error
- A hidden field is marked as required but has no pre-filled value. Add a pre-fill row for that field.
Hidden value not appearing in Google Forms responses
- Verify the pre-fill value is set. A hidden field without a pre-filled value submits as empty.