Linux 软件免费装
Banner图

Full State Name for Gravity Forms

开发者 izzygld
更新时间 2026年5月21日 00:33
捐献地址: 去捐款
PHP版本: 7.4 及以上
WordPress版本: 7.0
版权: GPLv2 or later
版权网址: 版权信息

标签

gravity forms notifications address field merge tags state name

下载

1.0.0 1.0.1 1.0.2

详情介绍:

Full State Name for Gravity Forms fixes an annoying inconsistency in Gravity Forms: depending on the form, the add-on, and the code path, the Address field's "State / Province" sub-input (input X.4) sometimes resolves to a 2-letter abbreviation ("NJ") and sometimes to the full state name ("New Jersey") when used in merge tags. This causes real problems with: The Solution This plugin hooks into gform_merge_tag_filter and, only when the merge tag targets an Address field's State sub-input (X.4) and the value is exactly a 2-letter code, expands it back to the full state name that Gravity Forms uses in its Address field dropdown. Key Features Where It Applies Covered Codes All US states (50), DC, US territories (PR, GU, VI, AS, MP), and military mailing regions (AA, AE, AP) — a total of 59 entries that match the default Gravity Forms Address state options exactly.

安装:

  1. Upload the full-state-name-for-gravity-forms folder to /wp-content/plugins/
  2. Activate the plugin through the 'Plugins' menu in WordPress
  3. That's it — merge tags that resolve to 2-letter state codes are now expanded automatically
No configuration pages or global settings needed.

升级注意事项:

1.0.2 Tested with WordPress 7.0. 1.0.0 Initial release.

常见问题:

Does this require Gravity Forms?

Yes. Gravity Forms 2.5 or higher must be installed and activated.

Does this change how state values are stored in entries?

No. Stored entry data is untouched. The expansion only happens when the value is being rendered through a merge tag.

Will it break my notifications that already show full state names?

No. The plugin only acts when the value is exactly a 2-letter code. Anything longer (including the full names you're already seeing) passes through unchanged.

I have a non-US address field. Can I add my own regions?

Yes — use the fsn_gf_state_map filter to merge in your own code-to-name pairs.

Does this affect the value posted by the form itself?

No. It only filters merge tag output. The submitted value, validation, and storage all behave exactly as Gravity Forms does by default.

更新日志:

1.0.2 1.0.1 1.0.0