Linux 软件免费装
Banner图

Phone Country Flag for FormCraft

开发者 kananiparth1326
更新时间 2026年12月1日 22:26
捐献地址: 去捐款
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

forms phone phone number country code intl-tel-input

下载

1.0.0 1.0.1

详情介绍:

Phone Country Flag for FormCraft enhances FormCraft form fields by adding an interactive international country flag dropdown, dial code selector, and visitor country code auto-detection. It turns standard text or number fields in FormCraft into smart, user-friendly international phone inputs powered by the industry-standard intl-tel-input library. Key Features How to use with FormCraft
  1. Option A (Recommended) - Custom Field Class:
  2. Edit your form in FormCraft.
  3. Click on the phone/mobile field to open its Field Options.
  4. Under Extra Classes (or Custom CSS Class), enter phone-country-flag (or your custom class defined in plugin settings).
  5. Save the form. The field will now automatically display the country flag dropdown!
  6. Option B - Automatic Detection:
  7. Simply label your field with "Phone", "Mobile", "WhatsApp", or "Contact Number".
  8. The plugin automatically identifies the field and attaches the flag dropdown.
  9. Option C - CSS Selector:
  10. For advanced forms, enter a specific CSS selector in Settings > FormCraft Phone Flag.

安装:

  1. Upload the phone-country-flag-for-formcraft folder to your /wp-content/plugins/ directory, or install it directly via the WordPress Admin Plugins screen.
  2. Activate the plugin through the Plugins menu in WordPress.
  3. Navigate to Settings > FormCraft Phone Flag in your WordPress dashboard to configure your default country, preferred countries, custom field class, and validation rules.
  4. Open your FormCraft form and add the custom CSS class phone-country-flag to any phone field, or let the plugin auto-detect your fields.

屏幕截图:

  • **FormCraft Frontend Form Preview**: Interactive country flag dropdown, dial code selector, and live phone validation in action.

升级注意事项:

1.0.1 Fixes input padding on FormCraft auto-popup forms and dynamic field z-index layering for country flag dropdowns. 1.0.0 Initial release.

常见问题:

Does this require the FormCraft plugin?

Yes, this plugin is specifically designed to seamlessly integrate with and enhance FormCraft forms (both free and premium versions).

How do I target a specific field in FormCraft?

Go to FormCraft, open your form, click on your target phone field, open Field Options, and enter phone-country-flag in the Extra Classes field. You can also customize this class name under Settings > FormCraft Phone Flag.

How does country code auto-detection work?

When enabled, the plugin checks the visitor's country code via browser GeoIP. The result is cached in the visitor's browser localStorage for 7 days so lookup happens only once.

Can I disable GeoIP auto-detection?

Yes. Uncheck the "Detect visitor's country from IP address" option in Settings > FormCraft Phone Flag, and the plugin will strictly use your configured Default Country.

Are any external CDN scripts loaded?

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.

Can I restrict the dropdown to only certain countries?

Yes. In Settings > FormCraft Phone Flag, enter a comma-separated list of 2-letter ISO country codes in the "Only these countries" field (e.g., us,gb,ca,in).

更新日志:

1.0.1 1.0.0