DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
dynamic field population

How to Use Dynamic Field Population to Auto-Fill WordPress Forms

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Dynamic field population fills a WordPress form from information already available in the visitor’s URL, the current page, another form entry, or WordPress content. In Gravity Forms, the most direct method is to enable dynamic population on a field, give it a parameter name, and append that parameter to the form URL. WPForms and Formidable Forms offer similar workflows, but their parameter syntax and data sources differ.

What dynamic field population does

Instead of asking visitors to type information you already know, a form reads a value from context and places it into a field. Common uses include campaign IDs, referral codes, source URLs, event names, and a selection carried over from an earlier form.

  • URL parameters: Values supplied after a question mark in a link.
  • Shortcodes and blocks: Values declared where a form is embedded.
  • PHP hooks: Values calculated at runtime.
  • Prior entries: Data retrieved from another form submission.
  • WordPress content: Choices loaded from posts, pages, categories, or taxonomies.

A populated value can be visible to the visitor or stored in a hidden field for attribution and processing.

Gravity Forms: auto-fill a field from a URL

Configure the destination field

  1. Edit the form and select the field that should receive the value.
  2. Open the field’s Advanced settings.
  3. Enable Allow Field To Be Populated Dynamically.
  4. Enter a unique parameter name, such as campaign_id.

Build the link

Append the parameter and value to the page URL:

https://example.com/contact/?campaign_id=8237123

When a visitor follows that link, Gravity Forms reads campaign_id and places 8237123 in the configured field. Parameter names are case-sensitive, so the spelling in the URL must match the name in the field settings.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Pass multiple choices

For checkboxes or multi-select fields, pass a comma-separated list. Choice values are case-sensitive; each value must match the value configured for its choice.

Avoid reserved parameter names

Do not use reserved WordPress terms such as name for a Gravity Forms parameter. Gravity Forms warns that such names can result in a 404. Use a distinctive, prefixed name instead, such as site_campaign_id. Ampersands cannot be used in a field parameter name or value.

Populate Gravity Forms with shortcodes, blocks, or PHP

Shortcode values

To provide values when embedding the form, use the field_values attribute:

[gravityform id="1" field_values="event_name=My Awesome Event"]

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Multiple values use the same ampersand-separated format supported by the Gravity Forms block.

Block settings

When inserting a Gravity Forms block, enter the values in its Field Values box. Use the parameter names configured on the target fields and separate multiple pairs with ampersands.

PHP hooks for calculated values

For a value that must be calculated at runtime, use a filter named for the parameter, such as gform_field_value_your_parameter, and return the value. Put custom code in the active theme, a custom functions plugin, an add-on, or a code-snippets plugin rather than editing a plugin’s files.

Store attribution without showing it

Use a Gravity Forms Hidden field when a populated value should be submitted but not displayed. This is appropriate for campaign IDs, referral codes, source URLs, or page context. Administrative fields are not part of the submission, so they cannot substitute for a Hidden field when the value must be saved.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Hidden fields improve convenience and attribution; they are not a security boundary. Treat every URL value as user-controlled input, validate and sanitize it before placing it in notifications, records, or integrations, and never put secrets in a query string.

WPForms: use its required prefill key format

WPForms supports sending information into a field through a query string and can redirect one form to another with the same mechanism. Its developer documentation requires a key in the form wpf{formID}_{fieldID}. For example, a field in form 20 with field ID 1 uses wpf20_1 as the destination key.

A custom key such as contact-reason does not populate a WPForms field under this prefill setting. Use the generated form-and-field key rather than Gravity Forms’ arbitrary parameter-name approach.

WPForms dynamic choices from WordPress content

Prefilling a known value is different from generating a changing list of choices. In WPForms, add a Dropdown, Multiple Choice, or Checkboxes field, then configure its choices to pull from WordPress content such as post titles, pages, categories, or taxonomies. The options can therefore track site content without manually editing the form each time content changes.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Formidable Forms: dynamic fields and values from another entry

Formidable Forms provides automatic population through Dynamic fields and the frm-field-value shortcode. That shortcode retrieves a value from specified fields in another form entry, which is useful when a second form should display or continue data submitted in the first. Formidable also documents autofill scenarios based on a WordPress role and other data sources.

Troubleshoot fields that stay empty or show stale data

Check the parameter and field configuration

  • Confirm that dynamic population is enabled on the exact target field.
  • Compare the URL parameter with the configured name character-for-character, including capitalization.
  • For checkboxes or multi-select fields, verify comma separation and exact choice values.
  • For WPForms, verify that the key follows wpf{formID}_{fieldID}.

Inspect caching

Gravity Forms warns that PHP-based dynamic population cannot run on cached pages. Aggressive page caching can also cache query-string parameters, producing a stale or missing value even when the URL is correct. Exclude the form page from page caching where necessary, and review script-optimizer and cache settings before changing the form.

Check what is actually submitted

If a value is visible but absent from the entry, confirm that the field is a normal or Hidden field rather than an Administrative field. If the value is present in the entry but missing from an email or integration, inspect that destination’s field mapping and sanitization rules.

Choose the right implementation

Plugin Input sources documented here Hidden values submitted? Dynamic choices Caching behavior Coding skill Licensing or add-on requirement
Gravity Forms URL, shortcode, block, PHP hook Yes, with a Hidden field; Administrative fields are not submitted Not stated PHP population does not run on cached pages; query-string caching can cause stale or missing values None for URL, shortcode, or block; PHP for calculated values Not stated
WPForms URL prefill and redirects using wpf{formID}_{fieldID} Not stated Yes, from posts, pages, categories, taxonomies, and similar WordPress content Not stated None for documented prefill and choice settings Not stated
Formidable Forms Dynamic fields, another form entry, WordPress role, and other documented sources Not stated Not stated Not stated None for standard dynamic fields; shortcode or configuration dependent Not stated

Use Gravity Forms when you need flexible parameter names plus shortcode, block, and hook options. Choose WPForms when WordPress-content-driven choices or its form-and-field prefill syntax fit your workflow. Choose Formidable Forms when a later form must retrieve values from an earlier entry.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Read next

Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.