{"id":10819,"date":"2026-05-21T00:29:49","date_gmt":"2026-05-20T16:29:49","guid":{"rendered":"https:\/\/aeosub.com\/full-state-name-for-gravity-forms\/"},"modified":"2026-05-21T00:29:49","modified_gmt":"2026-05-20T16:29:49","slug":"full-state-name-for-gravity-forms","status":"publish","type":"post","link":"https:\/\/aeosub.com\/zh\/full-state-name-for-gravity-forms\/","title":{"rendered":"Full State Name for Gravity Forms"},"content":{"rendered":"<div class=\"post-img\" style=\"margin-bottom: 25px\"><img decoding=\"async\" src=\"https:\/\/ps.w.org\/full-state-name-for-gravity-forms\/assets\/banner-1544x500.png?rev=3539697\" alt=\"Full State Name for Gravity Forms\" style=\"width: 100%;height: auto;border-radius: 12px\"><\/div>\n<div class=\"plugin-info-card\" style=\"border: 1px solid #e2e8f0;border-radius: 10px;overflow: hidden;margin-bottom: 30px;font-family: -apple-system, system-ui, sans-serif;background: #fff\">\n<table style=\"width: 100%;border-collapse: collapse;font-size: 14px\">\n<tr style=\"border-bottom: 1px solid #edf2f7\">\n<th style=\"padding: 15px 20px;text-align: left;width: 35%;color: #4a5568;background: #fcfcfc\"><img decoding=\"async\" src=\"https:\/\/ps.w.org\/full-state-name-for-gravity-forms\/assets\/icon-256x256.png?rev=3539697\" style=\"width: 40px;height: 40px;border-radius: 6px;margin-right: 12px;vertical-align: middle\"> Developer<\/th>\n<td style=\"padding: 15px 20px;font-weight: 500\"><a href=\"https:\/\/profiles.wordpress.org\/izzygld\/\" target=\"_blank\" rel=\"noopener\">izzy goldman<\/a><\/td>\n<\/tr>\n<tr style=\"border-bottom: 1px solid #edf2f7\">\n<th style=\"padding: 12px 20px;text-align: left;color: #4a5568;background: #fcfcfc\">Version<\/th>\n<td style=\"padding: 12px 20px\">v1.0.1<\/td>\n<\/tr>\n<tr style=\"border-bottom: 1px solid #edf2f7\">\n<th style=\"padding: 12px 20px;text-align: left;color: #4a5568;background: #fcfcfc\">Active Installs<\/th>\n<td style=\"padding: 12px 20px\">0 +<\/td>\n<\/tr>\n<tr style=\"border-bottom: 1px solid #edf2f7\">\n<th style=\"padding: 12px 20px;text-align: left;color: #4a5568;background: #fcfcfc\">Requires \/ Tested<\/th>\n<td style=\"padding: 12px 20px\">5.8 \/ 6.9.4<\/td>\n<\/tr>\n<tr style=\"border-bottom: 1px solid #edf2f7\">\n<th style=\"padding: 12px 20px;text-align: left;color: #4a5568;background: #fcfcfc\">Last Updated<\/th>\n<td style=\"padding: 12px 20px\">2026-05-20 4:27pm GMT<\/td>\n<\/tr>\n<tr>\n<th style=\"padding: 12px 20px;text-align: left;color: #4a5568;background: #fcfcfc\">Official Link<\/th>\n<td style=\"padding: 12px 20px\"><a href=\"https:\/\/wordpress.org\/plugins\/full-state-name-for-gravity-forms\/\" target=\"_blank\" style=\"text-decoration: none;color: #4a3bca;font-weight: bold\" rel=\"noopener\">View Details \u2192<\/a><\/td>\n<\/tr>\n<\/table><\/div>\n<div class=\"plugin-short-desc\" style=\"margin: 20px 0;padding: 12px 15px;background: #f9fafb;border-left: 4px solid #4a3bca;border-radius: 6px;font-style: italic;color: #4a5568\">Expand 2-letter US state codes (e.g. NJ) to full state names (e.g. New Jersey) in Gravity Forms Address merge tags.<\/div>\n<p><strong>Full State Name for Gravity Forms<\/strong> fixes an annoying inconsistency in Gravity Forms: depending on the form, the add-on, and the code path, the Address field&#8217;s &#8220;State \/ Province&#8221; sub-input (input X.4) sometimes resolves to a 2-letter abbreviation (&#8220;NJ&#8221;) and sometimes to the full state name (&#8220;New Jersey&#8221;) when used in merge tags.<\/p>\n<p>This causes real problems with:<\/p>\n<ul>\n<li>Notification emails that read &#8220;Your shipment is going to NJ.&#8221;<\/li>\n<li><code>{all_fields}<\/code> output mixing full city names with state codes.<\/li>\n<li>URL query strings that pre-populate another Gravity Form \u2014 the second form&#8217;s state dropdown doesn&#8217;t match &#8220;NJ&#8221; against its option value of &#8220;New Jersey&#8221;, so the field stays blank.<\/li>\n<\/ul>\n<h4>The Solution<\/h4>\n<p>This plugin hooks into <code>gform_merge_tag_filter<\/code> and, <strong>only when the merge tag targets an Address field&#8217;s State sub-input (X.4) and the value is exactly a 2-letter code<\/strong>, expands it back to the full state name that Gravity Forms uses in its Address field dropdown.<\/p>\n<h4>Key Features<\/h4>\n<ul>\n<li><strong>Targeted<\/strong> \u2014 Only affects Address field State sub-inputs (X.4), nothing else<\/li>\n<li><strong>Safe<\/strong> \u2014 Only acts when the value is exactly two letters; existing full names and other text pass through untouched<\/li>\n<li><strong>Zero Configuration<\/strong> \u2014 Activate the plugin and the fix is live<\/li>\n<li><strong>Filterable<\/strong> \u2014 Override or extend the code-to-name map with the <code>fsn_gf_state_map<\/code> filter for non-US addresses or translated labels<\/li>\n<li><strong>Filterable expansion<\/strong> \u2014 Hook <code>fsn_gf_expanded_state_name<\/code> to customize the replacement on a per-field basis<\/li>\n<\/ul>\n<h4>Where It Applies<\/h4>\n<ul>\n<li><code>{all_fields}<\/code> merge tag<\/li>\n<li><code>{Address (State \/ Province):X.4}<\/code> merge tag<\/li>\n<li>Notifications, confirmations, and any place merge tags are processed<\/li>\n<li>URL query strings built with merge tags (so the receiving form&#8217;s state dropdown picks the correct option)<\/li>\n<\/ul>\n<h4>Covered Codes<\/h4>\n<p>All US states (50), DC, US territories (PR, GU, VI, AS, MP), and military mailing regions (AA, AE, AP) \u2014 a total of 59 entries that match the default Gravity Forms Address state options exactly.<\/p>","protected":false},"excerpt":{"rendered":"<p>Expand 2-letter US state codes (e.g. NJ) to full state names (e.g. New Jersey) in Gravity Forms Address merge tags.<\/p>","protected":false},"author":1,"featured_media":9317,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[252],"tags":[1535,1536,1537,571,1538,555],"class_list":["post-10819","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-trends","tag-address-field","tag-gravity-forms","tag-merge-tags","tag-notifications","tag-state-name","tag-wordpress-plugin"],"_links":{"self":[{"href":"https:\/\/aeosub.com\/zh\/wp-json\/wp\/v2\/posts\/10819","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aeosub.com\/zh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aeosub.com\/zh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aeosub.com\/zh\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/aeosub.com\/zh\/wp-json\/wp\/v2\/comments?post=10819"}],"version-history":[{"count":0,"href":"https:\/\/aeosub.com\/zh\/wp-json\/wp\/v2\/posts\/10819\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/aeosub.com\/zh\/wp-json\/wp\/v2\/media\/9317"}],"wp:attachment":[{"href":"https:\/\/aeosub.com\/zh\/wp-json\/wp\/v2\/media?parent=10819"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aeosub.com\/zh\/wp-json\/wp\/v2\/categories?post=10819"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aeosub.com\/zh\/wp-json\/wp\/v2\/tags?post=10819"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}