Closed fransiscushermanto closed 5 years ago
Is the input empty when you init the plugin?
And can you confirm that your geoIpLookup
function is passing "id"
into the callback?
Yeah, it is passing "id" but on the elements it is still undefined. Emm, i show the country code using my code is that the problem, i put the value of dialCode to my input?
As per the docs for initialCountry
:
Note that the "auto" option will not update the country selection if the input already contains a number.
So how can i show the dial code? Is there any function to show dial code?
If you want to show the dial code at all times, I'd recommend the separateDialCode
option.
Can you confirm that if you leave the input empty then it is setting the flag correctly?
Yeah it works when input is empty, but my client want to show the dialcode. Is there any example of seperateDialCode function? so i can see how the function show the dialcode
Yeah it works when input is empty
Great. I'll close this issue then.
Is there any example of seperateDialCode function?
There is a screenshot in the readme. Just read about it in the readme and give it a try - it's fairly simple.
or
Is it true? cause i'have tried to do both but nothing change.. I have read Readme but there is no example for it on how using it.. can you please show me how to use it?
@fransiscushuang this is working for me (note: separate not seperate)
separateDialCode: true,
Hope this solves that particular issue!
Steps to reproduce
Set `window.intlTelInput(input, {
Expected behaviour
As my Ip address is from Indonesia it should pick Indonesia
Actual behaviour
It is undefined, but the callback success pass the information and it show all the information about city, country, ip, etc.
here is the picture of the undefined
Initialisation options
I'm using the code from the example, here's the link https://intl-tel-input.com/node_modules/intl-tel-input/examples/gen/default-country-ip.html