Code

Gravity Forms international phone input

Gravity Forms international phone input

This plugin can be used for for easy phone number input in international format with using flags of countries. Consist the option to set country automatically (using client IP) and phone number validation. To start plugin work – you need to activate it and enable “Friendly int. phone field” on your “Phone” field. It’s really simple.

Also check WP WooCommerce version of the plugin here: Link

Features:

  • Comfortable usability via admin panel
  • Works with any Wordpress theme
  • Cross browser compatibility
  • No coding required

Available filters:

  • gfi_show_only_countries – accept array of country codes which you want to show in list
  • gfi_initial_country – initial country code, if not set it will take user country country from IP address
  • gfi_preferred_countries – array of preferred countries
Example of usage:
add_filter('gfi_show_only_countries', function(){
    return ['ua', 'us', 'gb'];
});

add_filter('gfi_initial_country', function(){
    return 'ua';
});

add_filter('gfi_preferred_countries', function(){
    return ['ua', 'gb'];
});
v 1.2 - 22/03/2020
- Filters added

v 1.1.1 - 02/11/2019
- Bug fix

v 1.1 - 12/08/2019
- Multiple forms on single page support

v 1.0 - 07/07/2019
- First stable release
by
by
by
by
by
by