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.

Dynamic field population fills a WordPress form field from a URL, page context, another form entry, or site content instead of asking visitors to type the value. In Gravity Forms, enable the field’s dynamic-population setting and give it a parameter name; in WPForms, use its required field-ID key format for URL prefill. Hidden fields can retain submitted attribution data, while dynamic choices can keep dropdown options in sync with WordPress content.

What dynamic field population does

Dynamic population supplies a form field’s value from a source outside the visitor’s manual entry. Common uses include carrying a campaign ID from an ad link, recording which page led to a contact request, preselecting a reason for contact, or filling one form from an earlier submission. A related but different feature, dynamic choices, updates the options displayed in a dropdown, multiple-choice, or checkbox field from WordPress content.

These are convenience and attribution mechanisms, not proof that a value is trustworthy. A URL parameter is controlled by whoever opens the link, and hidden fields are still part of the submitted request. Validate and sanitize incoming values before using them in notifications, records, or integrations; never put secrets in a query string.

Auto-fill a Gravity Forms field from a URL

  1. Edit the form field. In the WordPress admin, open the form in the Gravity Forms editor and select the field you want to populate.
  2. Enable dynamic population. Open the field’s Advanced settings and turn on Allow Field To Be Populated Dynamically.
  3. Set a parameter name. Enter a distinctive name such as campaign_id. Parameter names are case-sensitive. Avoid reserved WordPress terms such as name, which can cause a 404; do not use ampersands in the parameter name or value. See Gravity Forms’ dynamic-population documentation.
  4. Pass the value in the form URL. Append the parameter and value to the page URL, for example https://example.com/contact/?campaign_id=8237123. The form field configured with campaign_id receives 8237123.

For checkboxes or multi-select fields, pass a comma-separated list of values. Choice values are case-sensitive, so the values in the URL must match the configured choices’ values exactly. Gravity Forms describes the feature as allowing a field to be populated with “a value (or values depending on the field type).”

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

Use shortcodes, the Gravity Forms block, or PHP

Shortcode

To pass values directly where a form shortcode is embedded, use the field_values attribute. For example: [gravityform id="1" field_values="event_name=My Awesome Event"]. The parameter on the left must correspond to the field’s dynamic-population parameter name.

Gravity Forms block

When embedding with the Gravity Forms block, use its Field Values box. It accepts the same ampersand-separated name/value format for supplying multiple values.

PHP hook for runtime values

When the value needs to be calculated at runtime rather than passed in a link or embed setting, a PHP filter named for the field parameter can return it. For a parameter called campaign_id, the hook is gform_field_value_campaign_id. Put custom code in an appropriate maintained location, such as a custom functions plugin, an add-on, a code-snippets plugin, or the active theme. Gravity Forms documents these options and mechanisms at its dynamic-population guide.

Keep attribution data in a submitted hidden field

If the visitor should not see a value such as a campaign ID, referral code, source URL, or page context, populate a Hidden field. Gravity Forms distinguishes this from Administrative fields: Administrative fields are not included in the submission, so they cannot store submitted metadata. A Hidden field is included in the submission while remaining out of the visible form. Follow the vendor’s guidance at Gravity Forms Hidden Fields.

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

Hidden means not displayed in the form, not protected from tampering. Treat the submitted value as untrusted input, and do not rely on it to authorize access, establish identity, or carry a secret.

WPForms: URL prefill uses field-ID keys

WPForms also supports pre-filling fields from query-string values, but its documented key format differs from Gravity Forms’ named parameter approach. The destination URL must use wpf{formID}_{fieldID}; for example, wpf20_1 refers to field 1 in form 20. A custom key such as contact-reason will not populate a WPForms field under this prefill method. The format can also be used when redirecting from one form to another. See the WPForms query-string tutorial and its developer documentation.

WPForms dynamic choices keep options in sync

Dynamic choices are not the same as filling in a field’s submitted value. They populate the available options in a Dropdown, Multiple Choice, or Checkboxes field from WordPress content, such as post titles, pages, categories, or taxonomies. This is useful when the choices change as site content changes and you do not want to maintain a second, static list in the form. Configure the field’s choices to use the desired content source; see WPForms’ guide to post-selection fields.

Formidable Forms: populate from another entry

Formidable Forms supports Dynamic fields and the frm-field-value shortcode for retrieving a value from a specified field in another form entry. Its automatic-population options can also use sources such as a WordPress role. This approach fits workflows in which a later form should reuse information already stored in an earlier entry, rather than requiring the value to be carried in a link. See Formidable Forms’ Dynamic Fields documentation.

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

Choose a plugin by the source and behavior you need

Plugin Documented input sources or workflow Hidden submitted values and dynamic choices Important implementation consideration
Gravity Forms URL query strings, shortcode values, block Field Values, and PHP hooks; dynamic fields can receive one or multiple values. Hidden fields can retain submitted values. The cited material does not establish dynamic choices from WordPress content. URL parameter names are case-sensitive; PHP population does not run on cached pages, and caching may also interfere with query-string values.
WPForms URL prefill using wpf{formID}_{fieldID}; redirecting from one form to another; choices sourced from WordPress content. Dynamic choices are documented for Dropdown, Multiple Choice, and Checkboxes fields. The cited material does not establish a separate hidden-field behavior. Use the documented form-and-field key, not an arbitrary parameter name.
Formidable Forms Dynamic fields, the frm-field-value shortcode for values from another form entry, and sources including WordPress roles. The cited material does not establish hidden-value or dynamic-choice behavior for the comparison here. Use the entry-retrieval workflow when the desired source is a previously submitted form entry.

The feature documentation cited here does not establish current licensing, plan, or add-on requirements for each capability, so check the plugin’s current product documentation before choosing on that basis.

Troubleshoot fields that stay blank or show stale values

  • Check spelling and capitalization. In Gravity Forms, the query-string name must match the configured parameter name exactly; parameter names are case-sensitive. For WPForms, verify the full wpf{formID}_{fieldID} key.
  • Confirm the field is configured for the source. Gravity Forms requires Allow Field To Be Populated Dynamically and a parameter name for URL-based population. WPForms’ dynamic-choice setup is separate from URL prefill.
  • Check caching. Gravity Forms says PHP-based dynamic population cannot run on cached pages. Page caching can also cache query-string parameters, producing stale or missing values. Check page-cache and script-optimizer settings if the URL is correct but the field does not update. See Gravity Forms’ dynamic-population guidance and its Hidden Field guidance.
  • Match choice values exactly. For Gravity Forms checkbox or multi-select fields, pass comma-separated values that match the configured choices, including capitalization.
  • Remove risky parameter names or characters. Do not use reserved WordPress terms such as name as a Gravity Forms parameter, and avoid ampersands in its parameter name or value.

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.