Services Plugins FAQs

Phone Number Input plugin bug - not automatically displaying pre-selected country if countries are limited to a specific set

Hello,

I’ve noticed that when I change the “only countries” options to only show one or a preselected group of countries (that is different from the location where the current user is), it doesn’t automatically select one of the pre-selected countries. Instead, it shows a blank field and the user has to manually select the drop down to see their country (see example below). For example, I’m located in the U.S. but if I limit countries to Canada, I don’t see Canada (or the first among the preselected list) displayed by default.

Is this a bug that Zeroqode can fix or is there a setting change I need to make to make it work properly?

When a preselected list is defined in the settings, it would be great to have the list default to the first country in the list if the user isn’t located in any of the preselected list. It’s not a good UI experience when this happens as it undermines the trust factor of the website.

Image 1: First screen a customer sees. User country not automatically selected

image

Image 2: User has to select the dropdown to see the preselected country before the country flag shows up in the circled area

image

Current relevant settings for Phone Number Input plugin

Hi @ebamoh,
Thank you for reaching out and for your purchase. :pray:

If I understood you correctly, you would like to restrict the list of available country phone prefixes, as well as auto-detection, enabled.

I’m afraid that once you are setting only the list of ISO countries codes in the dropdown to be displayed, this overrides the checkbox of auto-detection and it will show only the declared countries’ values.

I can check with the dev team if it is possible to improve the Phone Number Input with Formatting Plugin without damaging the logic of the plugin code, and I can let you know as soon as possible. Please note that we do not provide plugin customization or custom plugin development services but if the library of our plugin allows this improvement, we do always do our best to add new features to it.
Unfortunately, I cannot provide you with any timeframes, because this feature request is a low priority at the moment, but as soon as I have any updates I will let you know.
Thank you for your understanding.

For now, I suggest using what’s more prioritizing for your app, the Auto Detection feature or displaying only some country codes. Also please take into consideration that you can use both the Automatic Country Detection checkbox together with the Preferred Countries ISO codes to be displayed first in the list.

As I can see from the provided screenshots on the forum, you are using the phone number for the login form, you might be considering adding conditionals in the workflow to be able to successfully log in users only if their phone number contains a specific iso country code, otherwise display some alert message with the available list of countries phone codes.

Hope the above suggestions will be useful for you.
Please try my suggestions and let me know if they helped.

If you require any further information, feel free to contact me, I’ll be glad to help you.
Best regards,

Thank you, Igor. Basically what I’m requesting is that if there is a pre-selected list of countries, and the user is not from one of those countries, then the default country should be the first country in the pre-selected list. That way, the user doesn’t have to click the dropdown before seeing that the dropdown is a country selector.

Update. @Igor I don’t know what changed but it’s working now as requested. Even though I’m not based in the pre-selected country, the options are showing up with the first country in the pre-selected list selected by default. Thank you.

2 Likes

Hi @ebamoh,
Thank you for your reply. :pray:
Glad that everything is working now with the plugin for your use case. :slightly_smiling_face:

In case there will be any other plugin-related questions, please don’t hesitate to contact me, I’ll be glad to help.
Best regards,