{"id":146,"date":"2026-11-19T08:48:45","date_gmt":"2026-11-19T08:48:45","guid":{"rendered":"https:\/\/oddlylogical.com\/logical-forms\/?post_type=doc&#038;p=146"},"modified":"2026-11-23T00:00:16","modified_gmt":"2026-11-23T00:00:16","slug":"dynamic-population","status":"publish","type":"doc","link":"https:\/\/oddlylogical.com\/logical-forms-old\/docs\/dynamic-population\/","title":{"rendered":"Populate initial values dynamically"},"content":{"rendered":"<p>Dynamic population supplies an initial answer when a form opens. Supported fields offer Disabled, Parameter and\/or Current user under Advanced \u2192 Dynamic population. The configured default remains the fallback when a source is missing or invalid.<\/p>\n<h2 id=\"parameter\">Populate from a URL parameter<\/h2>\n<ol>\n<li>Select a supporting field and choose <strong>Parameter<\/strong>.<\/li>\n<li>Set a case-sensitive Parameter name, such as <code>lf_topic<\/code>.<\/li>\n<li>Save the form.<\/li>\n<li>Open the containing page with a matching query parameter.<\/li>\n<\/ol>\n<pre><code>https:\/\/example.com\/contact\/?lf_topic=support<\/code><\/pre>\n<p>Names begin with a letter and can contain letters, digits and underscores, up to 100 characters. The name binds an external input to this field; it does not replace the numeric field ID.<\/p>\n<figure class=\"lf-docs-shot\" id=\"lf-shot-dynamic-population-1\" data-lf-docs-asset=\"S26-dynamic-parameter\" style=\"--lf-shot-width: 424px\">\n  <a href=\"https:\/\/logicalforms.io\/wp-content\/uploads\/sites\/14\/2026\/11\/lf-docs-s26-dynamic-parameter.webp\" data-lf-docs-image data-native-width=\"848\" data-native-height=\"446\" aria-label=\"Enlarge screenshot: Choose Parameter and give the input a parameter name.\"><br \/>\n    <img src=\"https:\/\/logicalforms.io\/wp-content\/uploads\/sites\/14\/2026\/11\/lf-docs-s26-dynamic-parameter-424w.webp\" srcset=\"https:\/\/logicalforms.io\/wp-content\/uploads\/sites\/14\/2026\/11\/lf-docs-s26-dynamic-parameter-320w.webp 320w, https:\/\/logicalforms.io\/wp-content\/uploads\/sites\/14\/2026\/11\/lf-docs-s26-dynamic-parameter-424w.webp 424w, https:\/\/logicalforms.io\/wp-content\/uploads\/sites\/14\/2026\/11\/lf-docs-s26-dynamic-parameter.webp 848w\" sizes=\"auto, (min-width: 1168px) 424px, (min-width: 992px) min(424px, calc(100vw - 337px)), (min-width: 768px) min(424px, calc(100vw - 278px)), min(424px, calc(100vw - 48px))\" width=\"848\" height=\"446\" alt=\"Dynamic population set to Parameter with parameter name project.\" loading=\"lazy\" decoding=\"async\"><br \/>\n  <\/a><figcaption>Choose Parameter and give the input a parameter name.<\/figcaption><\/figure>\n<h2 id=\"embed\">Set an initial value in a shortcode<\/h2>\n<p>The shortcode accepts a URL query-string value under <code>field_values<\/code>. Replace 42 with the actual form ID and use parameter names you configured:<\/p>\n<pre><code>&#91;logical_forms id=\"42\" field_values=\"lf_topic=support\"&#93;<\/code><\/pre>\n<p>For a list, encode bracket keys so a closing bracket does not end the shortcode:<\/p>\n<pre><code>&#91;logical_forms id=\"42\" field_values=\"lf_interests%5B%5D=maps&amp;lf_interests%5B%5D=forms\"&#93;<\/code><\/pre>\n<p>Explicit embed values take priority over matching URL values. Encode special value characters normally. A comma is not a delimiter for multiple selections.<\/p>\n<h2 id=\"user\">Use the current WordPress user<\/h2>\n<p>On scalar supporting fields, Current user offers properties such as email, first name, last name, display name, username, user ID and website. Name can populate its enabled first and last parts automatically while retaining the configured middle fallback. Address offers Parameter rather than a built-in current-user address mapping.<\/p>\n<p>Signed-out visitors keep the configured default. A present blank property is a deliberate blank. These initial values remain editable and are not proof of identity or permission.<\/p>\n<h2 id=\"shapes\">Use the field's expected value<\/h2>\n<p>Choices need saved values rather than labels. Date uses <code>YYYY-MM-DD<\/code>; Time uses <code>HH:MM<\/code>. Name uses named parts such as first and last. Address uses line1, line2, city, state, postal_code and country, with supported lowercase country codes. An invalid candidate falls back to the static default.<\/p>\n<p>Consent, File Upload and display-only fields do not offer this feature. Internal fields ignore public population. Email confirmation remains blank even when the primary email is initially populated.<\/p>\n<h2 id=\"submission-cache\">After the visitor starts editing<\/h2>\n<p>Population runs for the initial form, not to replace recovered submitted values. A visitor's cleared answer stays cleared after validation feedback. Conditional hiding also does not repopulate an old default when the question appears again.<\/p>\n<p>Personalized initial HTML needs a per-visitor page render. Shared full-page caching can show an outdated or another visitor's initial value; configure form-page caching appropriately and check the signed-out\/signed-in result. The builder shows static defaults, while saved Preview evaluates initial sources for its viewing user.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Prefill Logical Forms fields from URL parameters, shortcode values or the current WordPress user, with clear fallback and submitted-value behavior.<\/p>\n","protected":false},"author":1,"featured_media":0,"menu_order":23,"template":"","doc-categories":[22],"class_list":["post-146","doc","type-doc","status-publish","hentry","doc_category-field-features"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Populate initial values dynamically | Logical Forms Docs<\/title>\n<meta name=\"description\" content=\"Prefill Logical Forms fields from URL parameters, shortcode values or the current WordPress user, with clear fallback and submitted-value behavior.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/oddlylogical.com\/logical-forms-old\/docs\/dynamic-population\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Populate initial values dynamically | Logical Forms Docs\" \/>\n<meta property=\"og:description\" content=\"Prefill Logical Forms fields from URL parameters, shortcode values or the current WordPress user, with clear fallback and submitted-value behavior.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/oddlylogical.com\/logical-forms-old\/docs\/dynamic-population\/\" \/>\n<meta property=\"og:site_name\" content=\"Logical Forms\" \/>\n<meta property=\"article:modified_time\" content=\"2026-11-23T00:00:16+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/logicalforms.io\/wp-content\/uploads\/sites\/14\/2026\/11\/lf-docs-s26-dynamic-parameter-424w.webp\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/oddlylogical.com\\\/logical-forms-old\\\/docs\\\/dynamic-population\\\/\",\"url\":\"https:\\\/\\\/oddlylogical.com\\\/logical-forms-old\\\/docs\\\/dynamic-population\\\/\",\"name\":\"Populate initial values dynamically | Logical Forms Docs\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/oddlylogical.com\\\/logical-forms-old\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/oddlylogical.com\\\/logical-forms-old\\\/docs\\\/dynamic-population\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/oddlylogical.com\\\/logical-forms-old\\\/docs\\\/dynamic-population\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/logicalforms.io\\\/wp-content\\\/uploads\\\/sites\\\/14\\\/2026\\\/11\\\/lf-docs-s26-dynamic-parameter-424w.webp\",\"datePublished\":\"2026-11-19T08:48:45+00:00\",\"dateModified\":\"2026-11-23T00:00:16+00:00\",\"description\":\"Prefill Logical Forms fields from URL parameters, shortcode values or the current WordPress user, with clear fallback and submitted-value behavior.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/oddlylogical.com\\\/logical-forms-old\\\/docs\\\/dynamic-population\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/oddlylogical.com\\\/logical-forms-old\\\/docs\\\/dynamic-population\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/oddlylogical.com\\\/logical-forms-old\\\/docs\\\/dynamic-population\\\/#primaryimage\",\"url\":\"https:\\\/\\\/logicalforms.io\\\/wp-content\\\/uploads\\\/sites\\\/14\\\/2026\\\/11\\\/lf-docs-s26-dynamic-parameter-424w.webp\",\"contentUrl\":\"https:\\\/\\\/logicalforms.io\\\/wp-content\\\/uploads\\\/sites\\\/14\\\/2026\\\/11\\\/lf-docs-s26-dynamic-parameter-424w.webp\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/oddlylogical.com\\\/logical-forms-old\\\/docs\\\/dynamic-population\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/oddlylogical.com\\\/logical-forms-old\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Documentation\",\"item\":\"https:\\\/\\\/oddlylogical.com\\\/logical-forms-old\\\/docs\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Populate initial values dynamically\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/oddlylogical.com\\\/logical-forms-old\\\/#website\",\"url\":\"https:\\\/\\\/oddlylogical.com\\\/logical-forms-old\\\/\",\"name\":\"Logical Forms\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/oddlylogical.com\\\/logical-forms-old\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Populate initial values dynamically | Logical Forms Docs","description":"Prefill Logical Forms fields from URL parameters, shortcode values or the current WordPress user, with clear fallback and submitted-value behavior.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/oddlylogical.com\/logical-forms-old\/docs\/dynamic-population\/","og_locale":"en_US","og_type":"article","og_title":"Populate initial values dynamically | Logical Forms Docs","og_description":"Prefill Logical Forms fields from URL parameters, shortcode values or the current WordPress user, with clear fallback and submitted-value behavior.","og_url":"https:\/\/oddlylogical.com\/logical-forms-old\/docs\/dynamic-population\/","og_site_name":"Logical Forms","article_modified_time":"2026-11-23T00:00:16+00:00","og_image":[{"url":"https:\/\/logicalforms.io\/wp-content\/uploads\/sites\/14\/2026\/11\/lf-docs-s26-dynamic-parameter-424w.webp","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/oddlylogical.com\/logical-forms-old\/docs\/dynamic-population\/","url":"https:\/\/oddlylogical.com\/logical-forms-old\/docs\/dynamic-population\/","name":"Populate initial values dynamically | Logical Forms Docs","isPartOf":{"@id":"https:\/\/oddlylogical.com\/logical-forms-old\/#website"},"primaryImageOfPage":{"@id":"https:\/\/oddlylogical.com\/logical-forms-old\/docs\/dynamic-population\/#primaryimage"},"image":{"@id":"https:\/\/oddlylogical.com\/logical-forms-old\/docs\/dynamic-population\/#primaryimage"},"thumbnailUrl":"https:\/\/logicalforms.io\/wp-content\/uploads\/sites\/14\/2026\/11\/lf-docs-s26-dynamic-parameter-424w.webp","datePublished":"2026-11-19T08:48:45+00:00","dateModified":"2026-11-23T00:00:16+00:00","description":"Prefill Logical Forms fields from URL parameters, shortcode values or the current WordPress user, with clear fallback and submitted-value behavior.","breadcrumb":{"@id":"https:\/\/oddlylogical.com\/logical-forms-old\/docs\/dynamic-population\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/oddlylogical.com\/logical-forms-old\/docs\/dynamic-population\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/oddlylogical.com\/logical-forms-old\/docs\/dynamic-population\/#primaryimage","url":"https:\/\/logicalforms.io\/wp-content\/uploads\/sites\/14\/2026\/11\/lf-docs-s26-dynamic-parameter-424w.webp","contentUrl":"https:\/\/logicalforms.io\/wp-content\/uploads\/sites\/14\/2026\/11\/lf-docs-s26-dynamic-parameter-424w.webp"},{"@type":"BreadcrumbList","@id":"https:\/\/oddlylogical.com\/logical-forms-old\/docs\/dynamic-population\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/oddlylogical.com\/logical-forms-old\/"},{"@type":"ListItem","position":2,"name":"Documentation","item":"https:\/\/oddlylogical.com\/logical-forms-old\/docs\/"},{"@type":"ListItem","position":3,"name":"Populate initial values dynamically"}]},{"@type":"WebSite","@id":"https:\/\/oddlylogical.com\/logical-forms-old\/#website","url":"https:\/\/oddlylogical.com\/logical-forms-old\/","name":"Logical Forms","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/oddlylogical.com\/logical-forms-old\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/oddlylogical.com\/logical-forms-old\/wp-json\/wp\/v2\/docs\/146","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oddlylogical.com\/logical-forms-old\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/oddlylogical.com\/logical-forms-old\/wp-json\/wp\/v2\/types\/doc"}],"author":[{"embeddable":true,"href":"https:\/\/oddlylogical.com\/logical-forms-old\/wp-json\/wp\/v2\/users\/1"}],"version-history":[{"count":3,"href":"https:\/\/oddlylogical.com\/logical-forms-old\/wp-json\/wp\/v2\/docs\/146\/revisions"}],"predecessor-version":[{"id":456,"href":"https:\/\/oddlylogical.com\/logical-forms-old\/wp-json\/wp\/v2\/docs\/146\/revisions\/456"}],"wp:attachment":[{"href":"https:\/\/oddlylogical.com\/logical-forms-old\/wp-json\/wp\/v2\/media?parent=146"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/oddlylogical.com\/logical-forms-old\/wp-json\/wp\/v2\/doc-categories?post=146"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}