diff --git a/README.md b/README.md index 7073397..fca26e2 100644 --- a/README.md +++ b/README.md @@ -1,62 +1,68 @@ # Ninja Forms SPN Addon -Wordpress plugin for entering and validating international telephone numbers based on [International Telephone Input.](https://github.com/jackocnr/intl-tel-input) It adds new field to [Ninja Forms.](https://ninjaforms.com/) It adds a flag dropdown to any input, detects the user's country, displays a relevant placeholder and provides formatting/validation methods. +Wordpress plugin for entering and validating international telephone numbers based on [International Telephone Input.](https://github.com/jackocnr/intl-tel-input) It adds new field to [Ninja Forms](https://ninjaforms.com/), a (searchable) country dropdown to any input, detects the user's country, displays a relevant placeholder number, formats the number as you type, and provides comprehensive validation methods. - +International Telephone Input ## Installation -1. Download this repository as .zip -2. In Wordpress select Plugins > Add New. -3. Select Download plugin. -4. Select Choose file. -5. Locate and select the plugin .zip file on your local computer, then click the Open button. -6. Select Install now. - -***You should activate Ninja Forms for correct operation of the Ninja Forms SPN Addon*** -## Usage -1. Go to Ninja Form. -2. Click add new field. -3. Сhoose Smart Phone +1. Install using the WordPress built-in Plugin installer, or Extract the zip file and drop the contents in the wp-content/plugins/ directory of your WordPress installation. +2. Activate ‘Ninja Forms‘ plugin through the ‘Plugins’ menu in WordPress. +3. Activate ‘Smart Phone Addon for Ninja Forms‘ plugin through the ‘Plugins’ menu in WordPress. +4. Go to Ninja Forms > Add New. +5. Press the ‘Add new field‘ button. +6. Select ‘Smart Phone‘ field. +7. Change the settings in the Restrictions section to suit your needs (play with [Storybook](https://intl-tel-input.com/storybook/?path=/docs/intltelinput--vanilla)). + Smart Phone -***Go to Restrictions for settings*** ## Features * **Allow IP Lookup** + IP Lookup Change default country depends on user IP * **Show Selected Dial Code** -Show Selected Dial Code - -Display the country dial code next to the selected flag so it's not part of the typed number. Note that this will disable National Mode because technically we are dealing with international numbers, but with the dial code separated. + +Show Selected Dial Code + +Display the country dial code next to the selected flag. Play with this option on [Storybook](https://intl-tel-input.com/storybook/?path=/docs/intltelinput--showselecteddialcode) (using the React component). * **Default Country** + Default Country Country in the input by default * **Preferred Countries** + Preferred Countries Specify the countries to appear at the top of the list. * **Only Countries** + Only Countries In the dropdown, display only the countries you specify * **Allow Dropdown** + Allow Dropdown Whether or not to allow the dropdown. If disabled, there is no dropdown arrow, and the selected flag is not clickable. Also we display the selected flag on the right instead because it is just a marker of state. * **National Mode** + National Mode + Allow users to enter national numbers (and not have to think about international dial codes). * **Auto Hide Dial Code** + Auto Hide Dial Code If there is just a dial code in the input: remove it on blur or submit. This is to prevent just a dial code getting submitted with the form. Requires nationalMode to be set to false. * **Exclude Countries** + Exclude Countries In the dropdown, display all countries except the ones you specify here. * **Format On Display** + Format On Display Format the input value (according to the National Mode option) diff --git a/README.txt b/README.txt index 04187d6..98a6412 100644 --- a/README.txt +++ b/README.txt @@ -4,46 +4,45 @@ Donate link: https://jdi.company Tags: Smart Phone Addon, Ninja Forms, SPN, intlTelInput, International Telephone Input Requires at least: 6.0 Tested up to: 6.4.3 -Stable tag: 1.3.0 +Stable tag: 1.3.1 License: GPLv2 License URI: http://www.gnu.org/licenses/gpl-2.0.html Requires PHP: 7.0 -This plugin is an addon to the Ninja Forms plugin. It adds a flag dropdown to any input, detects the user's country, displays a relevant placeholder and provides formatting/validation methods. +This addon for the Ninja Forms plugin adds a flag dropdown to any input, displays a relevant placeholder and provides formatting/validation methods. == Description == -It adds a flag dropdown to any input, detects the user's country, displays a relevant placeholder and provides formatting/validation methods. +Plugin for entering and validating international telephone numbers. It adds a (searchable) country dropdown to any input, detects the user's country, displays a relevant placeholder number, formats the number as you type, and provides comprehensive validation methods. -The Smart Phone is an addon to the Ninja Forms plugin. We use third part integration called intlTelInput. +The Smart Phone Addon for Ninja Forms uses third part integration called intlTelInput. -It's free absolutely. +For the best experience, including addressing any issues or finding previous versions, we highly recommend visiting our [GitHub Releases](https://github.com/JDI-company/Smart-Phone-for-Ninja-Forms/releases) page. +There, you can easily browse and download any version you require. -== GitHub == -If you have any problems or you want to downgrade the version, we recommend use GitHub. -Just change branch and download what you need. -Smart Phone for Ninja Forms on GitHub +This plugin is completely free. == Installation == This section describes how to install the plugin and get it working. -1. Upload `nf-smart-phone-addon` to the `/wp-content/plugins/` directory -2. Activate the plugin through the 'Plugins' menu in WordPress -3. Look for Smart Phone in the Ninja Forms Dashboard +1. Install using the WordPress built-in Plugin installer, or Extract the zip file and drop the contents in the wp-content/plugins/ directory of your WordPress installation. +2. Activate ‘Ninja Forms‘ plugin through the ‘Plugins’ menu in WordPress. +3. Activate ‘Smart Phone Addon for Ninja Forms‘ plugin through the ‘Plugins’ menu in WordPress. +4. Go to Ninja Forms > Add New. +5. Press the ‘Add new field‘ button. +6. Select ‘Smart Phone‘ field. +7. Change the settings in the Restrictions section to suit your needs (play with [Storybook](https://intl-tel-input.com/storybook/?path=/docs/intltelinput--vanilla)). == Frequently Asked Questions == -= Is it paid? = += Do I need to pay? = -No, it's free absolutely. -If you want to support us, see donate section. +No. This plugin is completely free. -= It doesn't work or my site was broken = += Having trouble or is your site not working correctly after activating our plugin? = -If your site was broken after activation our plugin, -please, create issue here: https://github.com/JDI-company/Smart-Phone-for-Ninja-Forms/issues -or write to us yaroslav.borodii@jdi.company +Please report the issue on our [GitHub](https://github.com/JDI-company/Smart-Phone-for-Ninja-Forms/issues) or feel free to reach out directly via email at yaroslav.borodii@jdi.company = Compatibility with Ninja Forms addons = - Ninja Forms:⠀⠀⠀⠀⠀⠀⠀OK | v3.8.0 @@ -59,6 +58,9 @@ or write to us yaroslav.borodii@jd 4. Screenshot 4. Some options that exist in the 'Restrictions' section of the field. == Changelog == += 1.3.1 = +#### What's Changed +- fix: Separate dial code is renamed by intltelinput by @yaroslav-borodii in [#39](https://github.com/JDI-company/Smart-Phone-for-Ninja-Forms/pull/39) = 1.3.0 = #### What's Changed @@ -130,6 +132,8 @@ or write to us yaroslav.borodii@jd * Init Ninja Forms Smart Phone Addon == Upgrade Notice == += 1.3.1 = +- If you use a *separate dial code* in your forms, please save the form to update the form settings = 1.1.0 = NOTE:
if you have used custom code to add a country code to your submissions in WordPress, you can remove it. diff --git a/ninja-forms-spn-addon.php b/ninja-forms-spn-addon.php index 4a334a7..8a90d9e 100644 --- a/ninja-forms-spn-addon.php +++ b/ninja-forms-spn-addon.php @@ -16,7 +16,7 @@ * Plugin Name: Smart Phone Addon for Ninja Forms * Plugin URI: https://github.com/JDI-company/Smart-Phone-for-Ninja-Forms * Description: Smart Phone Addon for Ninja Forms is a plugin to add country flag to the Phone Number field. - * Version: 1.3.0 + * Version: 1.3.1 * Author: JDI * Author URI: https://jdi.company * License: GPL-2.0+ @@ -50,7 +50,7 @@ * Start at version 1.0.0 and use SemVer - https://semver.org * Rename this for your plugin and update it as you release new versions. */ -define( 'NINJA_FORMS_SPN_ADDON_VERSION', '1.3.0' ); +define( 'NINJA_FORMS_SPN_ADDON_VERSION', '1.3.1' ); /** * The code that runs during plugin activation.