Skip to main content

Hidden Field

Purpose

The Hidden field type renders a hidden input that submits with the form. Choose a Hidden Value source so the field fills from page context, the logged-in user, a URL parameter, ACF, custom text, or (when WooCommerce is active) the current product.

When to use

  • Pass page, post, or site context into entries, emails, or webhooks without showing an input.
  • Capture campaign or referral data from the URL query string.
  • Prefill product details on a WooCommerce product singular page.
  • Attach logged-in user identity to a submission.

Key settings

  • Field — Field Type: hidden, Field Title, Admin Title, Field ID.
  • HiddenHidden Value (source), plus source-specific fields:
    • Custom Hidden Value when source is Custom Text
    • ACF Field when source is ACF Field
    • Date/Time Format when source is Current Date/Time (optional PHP date format; leave empty to use WordPress date and time settings)

Hidden value sources

General sources

SourceWhat it submits
Post/Page IDID of the current post or page
Post/Page TitleTitle of the current post or page
Full URL (includes query string)Full current request URL
Post TypeCurrent post type slug
Site NameSite title from WordPress settings
Current Date/TimeCurrent site date/time (optional custom format)
Referrer URLReferring URL when available
Page NameCurrent page/post name
Page URLCurrent page URL
Logged In UsernameUsername of the logged-in user
Logged In Display NameDisplay name of the logged-in user
Logged In User EmailEmail of the logged-in user
URL Parameter (matches Field ID)Value from the query string key that matches this field’s Field ID
ACF FieldValue from the selected ACF field in the current context
Custom TextFixed text you enter in Custom Hidden Value

WooCommerce product sources

When WooCommerce is active, these options appear in Hidden Value. They resolve only on a product singular page:

SourceWhat it submits
Product: SKUProduct SKU
Product: IDProduct ID
Product: NameProduct name
Product: PriceCurrent price
Product: Regular PriceRegular price
Product: Sale PriceSale price
Product: Stock StatusStock status
note

On non-product pages, WooCommerce hidden sources submit an empty value. Place product-context forms on the product template or singular product view.

Populate from a URL parameter

  1. Set Hidden Value to URL Parameter (matches Field ID).
  2. Set the field’s Field ID to the query key you expect (for example campaign).
  3. Open a URL such as https://yoursite.com/landing/?campaign=summer.

The submitted value is summer. Other hidden sources are not overridden by the query string.

Current date/time format

When Hidden Value is Current Date/Time:

  1. Leave Date/Time Format empty to use the site’s WordPress date and time formats.
  2. Or enter a PHP date format string (for example Y-m-d H:i) for a custom output.

Validation behavior

  • Hidden fields always submit with the form; visitors do not edit them.
  • Empty values usually mean the source has no context (guest user, missing ACF value, non-product page for WooCommerce sources, or missing URL parameter).
  • Test the exact page type and user state where the form will run.

Common mistakes

  • Choosing an ACF source that is not available on the current post or page.
  • Expecting WooCommerce product sources to work on archive, cart, or non-product pages.
  • Using URL Parameter without matching the query key to the Field ID.
  • Assuming hidden values appear in the form UI for visitor confirmation.

Verify it works

  1. Submit a test entry on the same page type visitors will use.
  2. Open Form Entries (or your notification email / webhook payload) and confirm the hidden value.
  3. For WooCommerce sources, test on a product singular page with known SKU/price data.
  4. For URL parameters, load the form with the query string present and confirm the captured value.

What's Next

  • Field mapping — Map hidden values into posts, users, or custom meta
  • Email notification — Include hidden values in admin emails
  • Webhooks — Send hidden context to external systems
  • FAQ — Troubleshooting when values are missing