Hidden Fields Explained: How to Pass Campaign Data, Affiliate IDs, and User Tokens
Hidden Fields Explained: How to Pass Campaign Data, Affiliate IDs, and User Tokens
When building web applications, marketing funnels, and partner referral programs, you often need to attach invisible contextual data to a form submission:
- The referring affiliate partner's ID (
affiliate_id=partner_441). - The logged-in customer's database UUID (
user_id=usr_882910). - The specific variant in an A/B test (
exp_variant=blue_cta). - The Google Click ID (
gclid=Cj0K...).
You cannot ask the user to type these values into visible text boxes:
"Please type your 32-character affiliate referral token here:"
The user has no idea what that token is, and asking for it would destroy your conversion rate.
The solution is Hidden Fields: invisible form inputs that silently read query parameters, browser cookies, or session tokens and submit them alongside the user's answers.
Here is the complete developer and marketer guide to hidden form fields.
How Hidden Fields Ingest Data
Incoming URL:
https://forms.yourbrand.com/apply?aff_id=alex88&plan=enterprise
│
▼
[ InfiForm Hidden Field Parser ]
- Reads ?aff_id ──► Maps to hidden key: `affiliateId`
- Reads ?plan ──► Maps to hidden key: `selectedTier`
│
▼
[ User Submits Form (Name + Email) ]
│
▼
[ Webhook Payload Dispatched ]
{
"email": "sarah@acme.com",
"affiliateId": "alex88", <-- Ingested Invisibly!
"selectedTier": "enterprise"
}
3 Core Implementation Strategies
1. Automatic URL Parameter Binding
In InfiForm, you simply add a Hidden Field block and name its parameter key (e.g., utm_campaign).
Whenever the form is loaded with ?utm_campaign=black_friday, the field automatically binds the value with zero custom JavaScript.
2. Cookie & LocalStorage Fallback
If the user navigates across multiple pages before reaching the form:
- The initial landing script stores
aff_idin a browser cookie. - The form reads the cookie on load, preserving partner attribution.
3. JWT / Encrypted User Token Passing
In SaaS in-app forms (e.g., in-app bug reports):
- Pass the signed JWT or user token via the embed script:
<iframe src="https://forms.yourbrand.com/f/feedback?user_id=12894&plan=pro"></iframe>
Conclusion: Total Data Continuity
Hidden fields bridge the gap between anonymous marketing clicks and downstream CRM intelligence.
Configure hidden fields on your active forms, track partner attribution reliably, and enrich your database records invisibly.
Related Articles
Why Google Forms Lacks Webhook Retries (And How to Avoid Dropped Submissions)
When Google Forms pushes submissions to Zapier or Make, API timeouts silently drop customer data. Here is how modern webhook retry queues guarantee zero lost leads.
How to Pass Hidden URL Variables and UTM Data Directly to Your CRM
Marketing teams waste thousands on paid ads because attribution data is lost between clicks and form submissions. Here is how to pass hidden UTM parameters into CRM records.
Looking for a 123FormBuilder Alternative? Here's What Modern Teams Switch To
123FormBuilder was built for the early 2010s web. Here is why modern teams are upgrading to contemporary platforms with faster load speeds, generative themes, and modern CRM sync.