Hidden Field
Pass invisible data with form submissions
Hidden Field
Hidden fields store and submit data without displaying anything to users. Useful for tracking, defaults, and passing contextual information.
When to use
- Tracking referral sources
- Passing page or post IDs
- Storing campaign information
- Setting default values from URL parameters
- Internal form identification
Settings
Field label
For your reference in the admin. Not shown to users.
Field ID
Unique identifier. Used to reference the field in integrations.
Default value
The value to submit. This is the core setting for hidden fields.
Dynamic values
Hidden fields support placeholders for dynamic data:
| Placeholder | Value |
|---|---|
{url} | Current page URL |
{referrer} | Referring URL |
{post_id} | Current post/page ID |
{post_title} | Current post/page title |
{user_id} | Logged-in user ID |
{user_email} | Logged-in user email |
{user_name} | Logged-in user display name |
{date} | Current date (Y-m-d) |
{time} | Current time (H:i:s) |
{ip} | User's IP address |
URL parameters
Capture URL parameters with the {get:param} placeholder:
URL: example.com/contact/?source=google&campaign=summer
Hidden Field Value: {get:source}
Result: googleCommon tracking parameters
| Parameter | Use |
|---|---|
{get:utm_source} | Traffic source |
{get:utm_medium} | Marketing medium |
{get:utm_campaign} | Campaign name |
{get:ref} | Referral ID |
{get:gclid} | Google Ads click ID |
{get:fbclid} | Facebook click ID |
Examples
Track page source
Label: Page URL
Field ID: source_url
Default Value: {url}Captures which page the form was submitted from.
UTM tracking
Add three hidden fields:
Field 1:
Label: UTM Source
Field ID: utm_source
Default Value: {get:utm_source}
Field 2:
Label: UTM Medium
Field ID: utm_medium
Default Value: {get:utm_medium}
Field 3:
Label: UTM Campaign
Field ID: utm_campaign
Default Value: {get:utm_campaign}Form identifier
When using the same form on multiple pages:
Label: Form Location
Field ID: form_location
Default Value: homepage-footerProduct inquiry
On product pages:
Label: Product
Field ID: product_id
Default Value: {post_id}Timestamp
Label: Submitted At
Field ID: submitted_at
Default Value: {date} {time}Security considerations
Hidden fields are NOT secure. Users can inspect and modify them using browser developer tools. Never use hidden fields for:
- Authentication tokens
- Pricing that shouldn't be changed
- Security-critical values
Do use for:
- Tracking and analytics
- Context (which page, which product)
- Convenience defaults
Don't use for:
- Payment amounts (use server-side calculation)
- User permissions
- Anything security-sensitive
Viewing hidden field data
Hidden field values appear in:
- Entry details in the WordPress admin
- Email notifications (if included in template)
- Webhook payloads sent to integrations
- Exported data (CSV, etc.)
Styling
Hidden fields render as:
<input type="hidden" name="fields[source_url]" value="https://example.com/contact/">They have no visual output and take up no space in the form.