| 开发者 | khavariali |
|---|---|
| 更新时间 | 2026年9月22日 03:40 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPL-3.0-or-later |
| 版权网址: | 版权信息 |
select* only if the field should be optional. Do not replace your entire existing form with the example.
3. Put the final country in your email — Screenshot 2
In the same form, open the Mail tab. Add the following line to Message body, then click Save:
Country: [visitor-country]
Keep your existing To, From, Subject and phone mail tag. Use a valid sender on your own domain. The selected country and calling code will be included in this line. Leave CountryCue's optional "Append a plain country section" unchecked when using this mail tag.
4. Display the form on your page
If your form is already on a page, use that page. Otherwise copy the shortcode shown at the top of the Contact Form 7 editor, add it to a Shortcode block on a page, and publish or update that page. Open the public page to check the dropdown.
5A. Any compatible host: manual selection — Screenshot 3
Open Settings > CountryCue. Choose "Manual selection only" under Country source, then Save Changes. No hosting geolocation switch, Cloudways account or paid service is needed. Visitors select their country; the email still receives the final choice with its calling code.
For AUTOMATIC suggestions, geolocation must instead be enabled in one of the supported setups below. Activating CountryCue alone does not enable hosting or Cloudflare geolocation. Choose 5B or 5C only when it matches your site.
5B. Cloudways: turn on Geo IP Detection — Screenshot 4
No. Manual selection works on any compatible WordPress host without geolocation. To suggest a country automatically, use either supported Cloudways Geo IP Detection or a verified direct Cloudflare connection. Cloudflare can be used with another hosting provider when the original-connection requirements above are met. If neither setup is available, visitors still select their country and the notification email still receives their final choice.
CountryCue reads country information supplied by supported hosting/CDN services; it does not include its own IP-to-country database or call a visitor-IP lookup service. Hosts expose GeoIP information differently, and some expose none. This version recognises the trusted Cloudways country header or a country header from a verified direct Cloudflare connection. Enabling another host's GeoIP feature alone does not add a supported integration. Manual selection remains available.
No. It requires WordPress and Contact Form 7. It does not support other form builders or non-WordPress sites.
No. Calling codes are display labels and email information. The plugin does not format, validate or prepend telephone numbers. Territories missing from the bundled calling-code data keep country-only labels. Some countries share a calling code.
[visitor-country] uses the final submitted dropdown choice, including a visitor correction, and adds its calling code. Use this tag for normal notifications.
Optional legacy-compatible tags are [_qh_selected_country] for the submitted selection, [_qh_country] for the provider's estimate, and [_qh_country_code] for the estimated two-letter ISO code. These estimates can differ from the submitted selection.
Automatic appending is off by default. You can opt in to a simple country section in the main notification (Mail). It uses the submitted choice, or the estimate if no recognised choice exists. It never automatically appends to Mail (2). Existing country mail tags prevent duplicate appended sections. Optional numeric form IDs limit email enrichment; dropdowns work wherever their tag is added.
IP location is an estimate. VPNs, proxies and mobile networks can change it; CountryCue does not detect VPN use. Visitors can correct the result. Confirm your hosting source, check the connection status in Settings > CountryCue, and exclude POST requests to wp-admin/admin-ajax.php from caching. If detection fails, manual selection still works.
Forms containing the country dropdown defer Contact Form 7's change-time validation until the first submit attempt. Submission validation remains active. Resetting a form restores the initial clean state. CountryCue does not block acceptance checkbox change events.
The server-rendered country list remains usable and Contact Form 7 handles its normal submission. Automatic suggestions and calling codes in the visible dropdown require JavaScript; email calling codes are added on the server.
First remove the dynamic country field from your forms or replace it with static values, and remove its custom mail tags. Deactivation stops its data provider and scheduled task. Deletion removes CountryCue settings, cached ranges and diagnostic metadata, including across multisite. Forms and email templates are never edited automatically.