{"id":242052,"date":"2025-08-15T08:26:40","date_gmt":"2025-08-15T08:26:40","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/forminator-phone-country-autodetect\/"},"modified":"2025-08-15T08:26:08","modified_gmt":"2025-08-15T08:26:08","slug":"phone-country-autodetect-for-forminator","status":"publish","type":"plugin","link":"https:\/\/cn.wordpress.org\/plugins\/phone-country-autodetect-for-forminator\/","author":23328118,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.0.1","stable_tag":"trunk","tested":"6.8.5","requires":"5.0","requires_php":"7.2","requires_plugins":null,"header_name":"Phone Country Autodetect for Forminator","header_author":"Huseyin Mardinli","header_description":"Automatically sets country calling code in Forminator phone field based on user IP. Requires Forminator and international mode enabled on phone field.","assets_banners_color":"","last_updated":"2025-08-15 08:26:08","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/www.paypal.com\/donate\/?hosted_button_id=MDDGA8HUZA4B4","header_plugin_uri":"","header_author_uri":"","rating":0,"author_block_rating":0,"active_installs":30,"downloads":266,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":{"1.0":"<p>Initial release.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3345057,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3345057,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":[],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3345048,"resolution":"1","location":"assets","locale":""}},"screenshots":{"1":"Plugin settings page with API key field and setup warnings.","2":"Forminator phone field pre-filled with country code."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[246322,145660,184701,4167,149230],"plugin_category":[],"plugin_contributors":[246323],"plugin_business_model":[],"class_list":["post-242052","plugin","type-plugin","status-publish","hentry","plugin_tags-auto-country","plugin_tags-country-code","plugin_tags-forminator","plugin_tags-ip-geolocation","plugin_tags-phone-field","plugin_contributors-housma","plugin_committers-housma"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/phone-country-autodetect-for-forminator\/assets\/icon-128x128.png?rev=3345057","icon_2x":"https:\/\/ps.w.org\/phone-country-autodetect-for-forminator\/assets\/icon-256x256.png?rev=3345057","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/phone-country-autodetect-for-forminator\/assets\/screenshot-1.png?rev=3345048","caption":"Plugin settings page with API key field and setup warnings."}],"raw_content":"<!--section=description-->\n<p>This lightweight plugin automatically sets the correct country calling code (<code>+44<\/code>, <code>+49<\/code>, etc.) in <strong>Forminator's phone field<\/strong> based on the user's IP address. No manual selection needed \u2014 just install, activate, and go!<\/p>\n\n<p>Perfect for improving user experience and reducing friction on international forms.<\/p>\n\n<p><strong>Features:<\/strong><\/p>\n\n<ul>\n<li>Detects user IP via Forminator's built-in methods<\/li>\n<li>Calls <a href=\"https:\/\/ipapi.co\">ipapi.co<\/a> to determine the country calling code<\/li>\n<li>Supports optional API key (free and paid)<\/li>\n<li>Adds an admin settings page to manage the key<\/li>\n<li>Built and maintained by <a href=\"https:\/\/github.com\/Housma\">Huseyin Mardinli<\/a><\/li>\n<\/ul>\n\n<h3>Usage<\/h3>\n\n<p>Make sure:\n- You're using the <strong>Forminator<\/strong> plugin by WPMU DEV.\n- Your phone field is configured with <strong>International Format<\/strong>.\n- You do <strong>not<\/strong> set a default value for the phone field.<\/p>\n\n<p>Once active, the phone field will automatically be pre-filled with the appropriate international calling code based on the user's IP.<\/p>\n\n<h3>External services<\/h3>\n\n<p>This plugin connects to the public IP geolocation service <strong>ipapi.co<\/strong> to detect the correct phone country calling code based on the visitor's IP address. It is required to automatically prefill the Forminator phone field with the appropriate country code.<\/p>\n\n<p><strong>What data is sent and when<\/strong>\n- On page load where the Forminator phone field is present (and only when autodetect is enabled), the plugin makes a server-side request to <code>https:\/\/ipapi.co\/{IP}\/country_calling_code\/<\/code>, where <code>{IP}<\/code> is the visitor's IP address determined by your site. This request is used to retrieve the international calling code (e.g., <code>+1<\/code>, <code>+44<\/code>).<\/p>\n\n<p><strong>Provider, Terms, and Privacy<\/strong>\n- Service: ipapi.co (Kloudend, Inc)\n- Terms of Service: https:\/\/ipapi.co\/terms\/\n- Privacy Policy: https:\/\/ipapi.co\/privacy\/<\/p>\n\n<p><strong>Notes<\/strong>\n- The request is performed from your server to ipapi.co, and includes the visitor's IP address in the URL path. ipapi.co may retain standard web server logs as described in their privacy policy.\n- If the external service is unavailable or returns an error, the plugin falls back to leaving the field unchanged (or to your configured default, if set).<\/p>\n\n<h3>Author<\/h3>\n\n<p>Developed by Huseyin Mardinli<br \/>\nGitHub: https:\/\/github.com\/Housma<br \/>\n\ud83d\udc99 Donate: <a href=\"https:\/\/www.paypal.com\/donate\/?hosted_button_id=MDDGA8HUZA4B4\">https:\/\/www.paypal.com\/donate\/?hosted_button_id=MDDGA8HUZA4B4<\/a><\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the plugin folder to <code>\/wp-content\/plugins\/<\/code> or install via WordPress Admin &gt; Plugins &gt; Add New.<\/li>\n<li>Activate the plugin.<\/li>\n<li>Go to <strong>Settings &gt; Forminator Phone Autodetect<\/strong>.<\/li>\n<li>(Optional) Enter your ipapi.co API key to avoid quota limits.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id='do%20i%20need%20an%20api%20key%3F'><h3>Do I need an API key?<\/h3><\/dt>\n<dd><p>No, but it's recommended. Without a key, you\u2019re limited to around 1000 IP lookups per month. You can get a free key from <a href=\"https:\/\/ipapi.co\">ipapi.co<\/a>.<\/p><\/dd>\n<dt id='does%20it%20work%20with%20ajax%20forms%20or%20popups%3F'><h3>Does it work with AJAX forms or popups?<\/h3><\/dt>\n<dd><p>Yes, as long as Forminator renders the field server-side. Dynamic\/AJAX-injected forms may require custom adjustments.<\/p><\/dd>\n<dt id='what%20if%20the%20location%20isn%27t%20detected%3F'><h3>What if the location isn't detected?<\/h3><\/dt>\n<dd><p>The field will simply remain empty or use the Forminator default.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0<\/h4>\n\n<ul>\n<li>Initial release with country detection and settings page<\/li>\n<\/ul>","raw_excerpt":"Automatically detects the user&#039;s country and pre-fills Forminator&#039;s phone field with the correct international calling code. Uses ipapi.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/242052","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=242052"}],"author":[{"embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/housma"}],"wp:attachment":[{"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=242052"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=242052"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=242052"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=242052"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=242052"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=242052"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}