{"id":409434,"date":"2026-11-28T05:01:52","date_gmt":"2026-11-28T05:01:52","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/phone-country-flag-for-formcraft\/"},"modified":"2026-11-28T05:01:16","modified_gmt":"2026-11-28T05:01:16","slug":"phone-country-flag-for-formcraft","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/phone-country-flag-for-formcraft\/","author":21179833,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.0","stable_tag":"1.0.0","tested":"7.1.5","requires":"5.6","requires_php":"7.4","requires_plugins":null,"header_name":"Phone Country Flag for FormCraft","header_author":"Parth Kanani","header_description":"Adds an international country flag dropdown, auto-detects visitor country codes, and validates phone numbers in FormCraft forms.","last_updated":"2026-11-28 05:01:16","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/pages.razorpay.com\/pl_T7Kh8oN3Z8jAyN\/view","header_plugin_uri":"https:\/\/wordpress.org\/plugins\/phone-country-flag-for-formcraft\/","header_author_uri":"https:\/\/profiles.wordpress.org\/kananiparth1326\/","rating":0,"author_block_rating":0,"active_installs":0,"downloads":39,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"kananiparth1326","date":"2026-11-28 05:01:16","revision":3830843}},"upgrade_notice":{"1.0.0":"<p>Initial release.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3830843,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3830843,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256},"icon.svg":{"filename":"icon.svg","revision":3830843,"resolution":false,"location":"assets","locale":false}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3830843,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3830843,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{"blueprint.json":{"filename":"blueprint.json","revision":3830871,"resolution":false,"location":"assets","locale":"","contents":"{\"$schema\":\"https:\\\/\\\/playground.wordpress.net\\\/blueprint-schema.json\",\"landingPage\":\"\\\/wp-admin\\\/options-general.php?page=phone-country-flag-for-formcraft\",\"preferredVersions\":{\"php\":\"8.0\",\"wp\":\"latest\"},\"phpExtensionHeaders\":{\"curl\":true},\"steps\":[{\"step\":\"login\",\"username\":\"admin\",\"password\":\"password\"},{\"step\":\"installPlugin\",\"pluginData\":{\"resource\":\"wordpress.org\\\/plugins\",\"slug\":\"phone-country-flag-for-formcraft\"},\"options\":{\"activate\":true}}]}"}},"all_blocks":[],"tagged_versions":["1.0.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3830843,"resolution":"1","location":"assets","locale":"","width":1280,"height":800},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3830843,"resolution":"2","location":"assets","locale":"","width":1280,"height":800}},"screenshots":{"1":"<strong>Plugin Settings Page<\/strong>: Configure custom field classes, keyword detection, fallback country, preferred country list, and phone validation.","2":"<strong>FormCraft Frontend Form Preview<\/strong>: Interactive country flag dropdown, dial code selector, and live phone validation in action."}},"plugin_section":[],"plugin_tags":[145660,601,284129,2644,5304],"plugin_category":[42],"plugin_contributors":[271311],"plugin_business_model":[],"class_list":["post-409434","plugin","type-plugin","status-publish","hentry","plugin_tags-country-code","plugin_tags-forms","plugin_tags-intl-tel-input","plugin_tags-phone","plugin_tags-phone-number","plugin_category-contact-forms","plugin_contributors-kananiparth1326","plugin_committers-kananiparth1326"],"banners":{"banner":"https:\/\/ps.w.org\/phone-country-flag-for-formcraft\/assets\/banner-772x250.png?rev=3830843","banner_2x":"https:\/\/ps.w.org\/phone-country-flag-for-formcraft\/assets\/banner-1544x500.png?rev=3830843","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":"https:\/\/ps.w.org\/phone-country-flag-for-formcraft\/assets\/icon.svg?rev=3830843","icon":"https:\/\/ps.w.org\/phone-country-flag-for-formcraft\/assets\/icon.svg?rev=3830843","icon_2x":false,"generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/phone-country-flag-for-formcraft\/assets\/screenshot-1.png?rev=3830843","caption":"<strong>Plugin Settings Page<\/strong>: Configure custom field classes, keyword detection, fallback country, preferred country list, and phone validation."},{"src":"https:\/\/ps.w.org\/phone-country-flag-for-formcraft\/assets\/screenshot-2.png?rev=3830843","caption":"<strong>FormCraft Frontend Form Preview<\/strong>: Interactive country flag dropdown, dial code selector, and live phone validation in action."}],"raw_content":"<!--section=description-->\n<p><strong>Phone Country Flag for FormCraft<\/strong> enhances FormCraft form fields by adding an interactive international country flag dropdown, dial code selector, and visitor country code auto-detection.<\/p>\n\n<p>It turns standard text or number fields in FormCraft into smart, user-friendly international phone inputs powered by the industry-standard <code>intl-tel-input<\/code> library.<\/p>\n\n<h3>Key Features<\/h3>\n\n<ul>\n<li><strong>Direct Custom Field Class Support<\/strong>: Simply assign your chosen CSS class (<code>phone-country-flag<\/code> or <code>fcpf-phone-flag<\/code>) to any field inside FormCraft's field settings to instantly enable the country flag dropdown on that specific field.<\/li>\n<li><strong>Automatic Visitor Country Detection<\/strong>: Detects the visitor's country using browser-based GeoIP lookup (cached in the browser to reduce network requests).<\/li>\n<li><strong>Smart Keyword Matching<\/strong>: Automatically discovers phone fields across your forms based on common keywords (e.g., <code>mobile<\/code>, <code>phone<\/code>, <code>whatsapp<\/code>, <code>contact<\/code>, <code>tel<\/code>).<\/li>\n<li><strong>Real-Time Phone Validation<\/strong>: Validates international phone formats on blur and input change, displaying friendly custom error messages when an invalid number is entered.<\/li>\n<li><strong>Preferred &amp; Restrictive Countries<\/strong>: Pin key countries to the top of the dropdown list or restrict the selector to only accept specific countries.<\/li>\n<li><strong>FormCraft Popup &amp; AJAX Support<\/strong>: Seamlessly works with AJAX-submitted forms, multi-step forms, and popup modals using DOM mutation observers.<\/li>\n<li><strong>100% Bundled &amp; GDPR Friendly<\/strong>: All core CSS, JavaScript, and flag sprite assets are bundled locally in the plugin \u2014 no external CDN dependencies.<\/li>\n<li><strong>Zero Bloat &amp; High Performance<\/strong>: Lightweight, asynchronous script execution with browser localStorage caching.<\/li>\n<\/ul>\n\n<h3>How to use with FormCraft<\/h3>\n\n<ol>\n<li><p><strong>Option A (Recommended) - Custom Field Class:<\/strong><\/p>\n\n<ul>\n<li>Edit your form in FormCraft.<\/li>\n<li>Click on the phone\/mobile field to open its <strong>Field Options<\/strong>.<\/li>\n<li>Under <strong>Extra Classes<\/strong> (or <strong>Custom CSS Class<\/strong>), enter <code>phone-country-flag<\/code> (or your custom class defined in plugin settings).<\/li>\n<li>Save the form. The field will now automatically display the country flag dropdown!<\/li>\n<\/ul><\/li>\n<li><p><strong>Option B - Automatic Detection:<\/strong><\/p>\n\n<ul>\n<li>Simply label your field with \"Phone\", \"Mobile\", \"WhatsApp\", or \"Contact Number\".<\/li>\n<li>The plugin automatically identifies the field and attaches the flag dropdown.<\/li>\n<\/ul><\/li>\n<li><p><strong>Option C - CSS Selector:<\/strong><\/p>\n\n<ul>\n<li>For advanced forms, enter a specific CSS selector in <strong>Settings &gt; FormCraft Phone Flag<\/strong>.<\/li>\n<\/ul><\/li>\n<\/ol>\n\n<h3>Privacy Policy \/ Third-Party Services<\/h3>\n\n<p>This plugin provides an optional feature to automatically detect a visitor's country code based on their IP address:<\/p>\n\n<ol>\n<li><p><strong>ipwhois.io \/ ipwho.is<\/strong> (Primary GeoIP provider)<\/p>\n\n<ul>\n<li>Service URL: https:\/\/ipwhois.io\/<\/li>\n<li>Terms of Service: https:\/\/ipwhois.io\/terms<\/li>\n<li>Privacy Policy: https:\/\/ipwhois.io\/privacy<\/li>\n<li>Data transmitted: The visitor's IP address is sent directly from the visitor's browser to resolve their 2-letter country code.<\/li>\n<\/ul><\/li>\n<li><p><strong>ipapi.co<\/strong> (Fallback GeoIP provider)<\/p>\n\n<ul>\n<li>Service URL: https:\/\/ipapi.co\/<\/li>\n<li>Terms of Service: https:\/\/ipapi.co\/terms\/<\/li>\n<li>Privacy Policy: https:\/\/ipapi.co\/privacy\/<\/li>\n<li>Data transmitted: The visitor's IP address is sent directly from the visitor's browser if the primary provider fails.<\/li>\n<\/ul><\/li>\n<\/ol>\n\n<p><strong>Opt-out<\/strong>: Site administrators can completely disable GeoIP auto-detection at any time by unchecking \"Detect visitor's country from IP address\" in <strong>Settings &gt; FormCraft Phone Flag<\/strong>. When disabled, no external requests are made and the default fallback country is used instead.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>phone-country-flag-for-formcraft<\/code> folder to your <code>\/wp-content\/plugins\/<\/code> directory, or install it directly via the WordPress Admin Plugins screen.<\/li>\n<li>Activate the plugin through the <strong>Plugins<\/strong> menu in WordPress.<\/li>\n<li>Navigate to <strong>Settings &gt; FormCraft Phone Flag<\/strong> in your WordPress dashboard to configure your default country, preferred countries, custom field class, and validation rules.<\/li>\n<li>Open your FormCraft form and add the custom CSS class <code>phone-country-flag<\/code> to any phone field, or let the plugin auto-detect your fields.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"does%20this%20require%20the%20formcraft%20plugin%3F\"><h3>Does this require the FormCraft plugin?<\/h3><\/dt>\n<dd><p>Yes, this plugin is specifically designed to seamlessly integrate with and enhance FormCraft forms (both free and premium versions).<\/p><\/dd>\n<dt id=\"how%20do%20i%20target%20a%20specific%20field%20in%20formcraft%3F\"><h3>How do I target a specific field in FormCraft?<\/h3><\/dt>\n<dd><p>Go to <strong>FormCraft<\/strong>, open your form, click on your target phone field, open <strong>Field Options<\/strong>, and enter <code>phone-country-flag<\/code> in the <strong>Extra Classes<\/strong> field. You can also customize this class name under <strong>Settings &gt; FormCraft Phone Flag<\/strong>.<\/p><\/dd>\n<dt id=\"how%20does%20country%20code%20auto-detection%20work%3F\"><h3>How does country code auto-detection work?<\/h3><\/dt>\n<dd><p>When enabled, the plugin checks the visitor's country code via browser GeoIP. The result is cached in the visitor's browser <code>localStorage<\/code> for 7 days so lookup happens only once.<\/p><\/dd>\n<dt id=\"can%20i%20disable%20geoip%20auto-detection%3F\"><h3>Can I disable GeoIP auto-detection?<\/h3><\/dt>\n<dd><p>Yes. Uncheck the \"Detect visitor's country from IP address\" option in <strong>Settings &gt; FormCraft Phone Flag<\/strong>, and the plugin will strictly use your configured Default Country.<\/p><\/dd>\n<dt id=\"are%20any%20external%20cdn%20scripts%20loaded%3F\"><h3>Are any external CDN scripts loaded?<\/h3><\/dt>\n<dd><p>No. All required scripts, styles, and flag images are bundled directly within the plugin to ensure fast loading times, offline support, and strict privacy compliance.<\/p><\/dd>\n<dt id=\"can%20i%20restrict%20the%20dropdown%20to%20only%20certain%20countries%3F\"><h3>Can I restrict the dropdown to only certain countries?<\/h3><\/dt>\n<dd><p>Yes. In <strong>Settings &gt; FormCraft Phone Flag<\/strong>, enter a comma-separated list of 2-letter ISO country codes in the \"Only these countries\" field (e.g., <code>us,gb,ca,in<\/code>).<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release: FormCraft phone field country flag dropdown, GeoIP auto-detection, and real-time validation.<\/li>\n<\/ul>","raw_excerpt":"Adds an international country flag dropdown, auto-detects visitor country codes, and validates phone numbers in FormCraft forms.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/409434","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=409434"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/kananiparth1326"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=409434"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=409434"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=409434"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=409434"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=409434"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=409434"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}