20
Views
4
Comments
[International Telephone Input Reactive] Country flag changes randomly on input of Mobile Number
international-telephone-input-reactive
Reactive icon
Forge asset by Rúben Meireles
Application Type
Reactive

As I type in Input field, Country flag changes based on my input, I have to restrict it changes randomly, user can only change it from the dropdown if he or she wants to do so. 
Please suggest me anything from the component that I can use for the same. 

 i Have also used formatasyoutype option , but its not working. 

2025-12-09 14-11-18
Janakiraman JR

Hi Neha,

This component includes a strictMode option that prevents the country flag from changing based on the user's typed input.

To enable this behavior:

  • Set strictMode = true in the widget's init. This ensures that typing a number won’t automatically switch the country flag.

  • You can control whether the user is allowed to change the country manually by setting allowDropdown to true or false.

Here’s what the configuration might look like:

intlTelInput(inputElement, {

  formatAsYouType: true,

  strictMode: true,  // Prevents automatic flag changes 

  allowDropdown: true // Set to false if you want to disable the dropdown entirely

});

With this setup, users can still change the country via the dropdown (if enabled), but the flag will no longer update automatically based on what they type.


UserImage.jpg
Neha Bhimsaria

Hello @JR.  
Thank you for your answer, but this is not working as expected, still it is getting changed on type.

2025-07-22 10-30-27
Mandar Deshpande

Hi @Neha Bhimsaria 

You can try turning off component's input properties, something like DetectCountryOnInput/AutoSelectCountry. 

2024-12-02 12-15-17
Aravind EONE

Hi @Neha Bhimsaria ,

Please send the screenshot of your current configuration for better understanding.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.