Elementor Form Country Field
A lightweight WordPress plugin that adds a custom Country / State field type to the Elementor Pro classic Form widget.
by TrustyCoder · github.com/forhad1325/elementor-form-country-field · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/forhad1325/elementor-form-country-field/archive/refs/heads/main.zipReadme
=== Elementor Form Country Field === Contributors: trustycoder Tags: elementor, elementor pro, forms, country, state Requires at least: 5.8 Tested up to: 6.6 Requires PHP: 7.4 Stable tag: 1.0.0 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html
Adds a "Country / State" field type to the Elementor Pro classic Form widget, with a conditional Province/State/Region sub-field.
== Description ==
Elementor Form Country Field registers a custom "Country / State" field type for the Elementor Pro Form widget (classic forms).
When a visitor selects a country:
- Canada shows a Province dropdown.
- USA shows a State dropdown.
- Other shows a free-text Country/Region input.
Each field instance has a Region Field Layout option (under the field's Content settings) to display the Province/State/Region field either Below the country dropdown (full width, stacked) or Side by side (50/50 width).
= Requirements =
This plugin requires Elementor and Elementor Pro to be installed and active. Elementor Pro provides the Form widget that this plugin extends; without it, the plugin has no effect.
== Installation ==
- Make sure Elementor and Elementor Pro are installed and active.
- Upload the plugin files to
/wp-content/plugins/elementor-form-country-field, or install the plugin through the WordPress plugins screen directly. - Activate the plugin through the 'Plugins' screen in WordPress.
- Edit any page with an Elementor Pro Form widget, add a field, and set its Type to Country / State.
== Frequently Asked Questions ==
= The field shows blank in the Elementor editor canvas right after I add it or change its Type — is this a bug? =
No — this is expected behavior caused by how Elementor Pro's editor works, not a defect in this plugin.
Elementor Pro's Form widget renders its live, unsaved editing canvas preview using client-side JavaScript templates that are bundled inside Elementor Pro itself — one template per built-in field type (Text, Email, Select, Radio, Date, etc.). Elementor Pro does not currently expose a public, documented API for third-party plugins to register a JavaScript template for a custom field type's live canvas preview. When the canvas encounters a field type it has no bundled template for — which includes every third-party custom field type, not just this plugin's — it falls back to rendering a plain, untyped text input until the next full server-side render.
This plugin's field renders correctly, with full styling and conditional Province/State/Region behavior, in all of the following:
- The actual front-end page visitors see.
- Elementor's "Preview" mode (the eye icon), which loads the real page without the editor overlay.
- The editor canvas itself, immediately after you Save the page (a Save triggers a full reload that goes through normal PHP rendering).
Only the unsaved, live-editing canvas view is affected. Workflow recommendation: after adding or changing the field, Save the page (or use Preview) to see it rendered correctly; you do not need to publish to verify it.
= Why does it require Elementor Pro instead of free Elementor? =
The classic Form widget that this plugin extends is part of Elementor Pro, not the free Elementor plugin. There is no free-Elementor equivalent to extend.
== Changelog ==
= 1.0.0 =
- Initial release. Country/State field type for Elementor Pro forms, with Below/Side-by-side region layout option.
== Upgrade Notice ==
= 1.0.0 = Initial release.