Skip to content

Commit

Permalink
Tagging version 1.3.1
Browse files Browse the repository at this point in the history
- Improve README files
  • Loading branch information
yaroslav-borodii committed Mar 10, 2024
1 parent ac295b3 commit 1c924e9
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 39 deletions.
42 changes: 24 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.

<img src="https://camo.githubusercontent.com/8ab702251e06630c69065dadfecde9feda9975a8e7707c75ec1ee085b4fc6b04/68747470733a2f2f7261772e6769746875622e636f6d2f6a61636b6f636e722f696e746c2d74656c2d696e7075742f6d61737465722f73637265656e73686f74732f76616e696c6c612e706e67" width="424" height="246">
<img alt="International Telephone Input" width="238" height="276" src="https://camo.githubusercontent.com/4bb218ca834ec5acca43c965432c1014cab16f6d32119d469e1242d47d449d5d/68747470733a2f2f7261772e6769746875622e636f6d2f6a61636b6f636e722f696e746c2d74656c2d696e7075742f6d61737465722f73637265656e73686f74732f76616e696c6c612d7365617263682e706e67">

## 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)).

<img width="911" alt="Smart Phone" src="https://user-images.githubusercontent.com/46939084/204000296-ba449c62-6d09-4fab-bd84-cbc657b7a9ce.png">

***Go to Restrictions for settings***
## Features
* **Allow IP Lookup**

<img width="600" alt="IP Lookup" src="https://user-images.githubusercontent.com/46939084/204006934-5ac1d6df-848f-436d-82ac-dd0e62f67b03.png">

Change default country depends on user IP
* **Show Selected Dial Code**
<img width="600" alt="Show Selected Dial Code" src="https://user-images.githubusercontent.com/46939084/204007378-50a3db49-4f07-4ab4-91f4-5c42fd2f2c73.png">
<img src="https://camo.githubusercontent.com/200f3411c2f34ad772b7492a80b6a25297ad9d3ce1235c07238dbb405834e31e/68747470733a2f2f7261772e6769746875622e636f6d2f6a61636b6f636e722f696e746c2d74656c2d696e7075742f6d61737465722f73637265656e73686f74732f73657061726174654469616c436f64652e706e67" width="257px" height="46px" data-canonical-src="https://raw.github.com/jackocnr/intl-tel-input/master/screenshots/separateDialCode.png" >
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.

<img alt="Show Selected Dial Code" width="257" height="46" src="https://camo.githubusercontent.com/0d223e231ced86183d286196d3cab6e411f677f6695efa625dabdd44d0b4f65e/68747470733a2f2f7261772e6769746875622e636f6d2f6a61636b6f636e722f696e746c2d74656c2d696e7075742f6d61737465722f73637265656e73686f74732f73657061726174654469616c436f64652e706e67">

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**

<img width="600" alt="Default Country" src="https://user-images.githubusercontent.com/46939084/204008019-65500e12-06ae-4503-b0a5-a42a0fbc78ed.png">

Country in the input by default
* **Preferred Countries**

<img width="600" alt="Preferred Countries" src="https://user-images.githubusercontent.com/46939084/204008199-69d512ee-2652-4375-8302-6ca3c4940a2d.png">

Specify the countries to appear at the top of the list.
* **Only Countries**

<img width="600" alt="Only Countries" src="https://user-images.githubusercontent.com/46939084/204008692-8ee05c63-5743-4386-8027-4dd4460f22ea.png">

In the dropdown, display only the countries you specify
* **Allow Dropdown**

<img width="600" alt="Allow Dropdown" src="https://user-images.githubusercontent.com/46939084/204009492-6ea4550a-f9db-49bc-abd7-b08ad00c1eec.png">

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**

<img width="600" alt="National Mode" src="https://user-images.githubusercontent.com/46939084/204010304-f3e80ac5-d6ec-4e6f-b405-6e99758e4937.png">

Allow users to enter national numbers (and not have to think about international dial codes).
* **Auto Hide Dial Code**

<img width="600" alt="Auto Hide Dial Code" src="https://user-images.githubusercontent.com/46939084/204010466-368185d0-ece6-477c-8176-a0e2a9356829.png">

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**

<img width="600" alt="Exclude Countries" src="https://user-images.githubusercontent.com/46939084/204010658-4e66abcb-453a-4382-9ded-70bb950e332d.png">

In the dropdown, display all countries except the ones you specify here.
* **Format On Display**

<img width="600" alt="Format On Display" src="https://user-images.githubusercontent.com/46939084/204010814-64c5bb1d-7ee7-4df2-ba72-f93fd1d9f36d.png">

Format the input value (according to the National Mode option)
Expand Down
42 changes: 23 additions & 19 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href="https://github.com/jackocnr/intl-tel-input">intlTelInput</a>.
The Smart Phone Addon for Ninja Forms uses third part integration called <a href="https://github.com/jackocnr/intl-tel-input">intlTelInput</a>.

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.
<a href="https://github.com/JDI-company/Smart-Phone-for-Ninja-Forms" target="_blank">Smart Phone for Ninja Forms on GitHub</a>
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 <a href="mailto:[email protected]">[email protected]</a>
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 <a href="mailto:[email protected]">[email protected]</a>

= Compatibility with Ninja Forms addons =
- Ninja Forms:⠀⠀⠀⠀⠀⠀⠀OK | v3.8.0
Expand All @@ -59,6 +58,9 @@ or write to us <a href="mailto:[email protected]">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
Expand Down Expand Up @@ -130,6 +132,8 @@ or write to us <a href="mailto:[email protected]">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:<br>if you have used custom code to add a country code to your submissions in WordPress, you can remove it.
Expand Down
4 changes: 2 additions & 2 deletions ninja-forms-spn-addon.php
Original file line number Diff line number Diff line change
Expand Up @@ -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+
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 1c924e9

Please sign in to comment.