question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

setNumber using a international number

See original GitHub issue

// Note: this is not a real Issue, but could not find a fix on Google.

Hi Jackocnr,

I’ve been using in-tel-number for a while now, and so far i’m realley happy with it. Good work! I’m currently working on a big application, where I store the numbers in our database. The numbers are formatted as international numbers using your plugin(e.g. +31629435375).

In our application we want to allow our users to change their phone number. To do so we load the phone number and put it into $("#phoneCall").intlTelInput("setNumber", PHONE_CALL_FROM_DATABASE); But it does not seem to add it properly.

In the readme file you say that by default, if nationalMode is enabled it will try to use national formatting. I think that’s the problem, but disabling nationalMode in the settings is not an option. so the question: is there a way to set the phone input field with a international number while nationalMode is enabled?

Greets, Zino

Initialisation options

allowExtensions:        false
autoFormat:             true
autoHideDialCode:       true
autoPlaceholder:        true
customPlaceholder:      null
defaultCountry:         ""
geoIpLookup:            null
nationalMode:           true
numberType:             "MOBILE"
onlyCountries:          undefined
preferredCountries:     ['us', 'gb']
skipUtilScriptDownload: false
utilsScript:            ""

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ghostcommented, May 15, 2016

It does only show the place holder, I want it to show the right flag and the national phone number.

0reactions
jackocnrcommented, May 27, 2016

Closing due to inactivity.

Read more comments on GitHub >

github_iconTop Results From Across the Web

International Telephone Input With Flags and Dial Codes
When clicking the dropdown list, it lists all the countries and their international dial codes next to their flags. Ideal for international ......
Read more >
International Telephone Input
A JavaScript plugin for entering and validating international telephone numbers. It adds a flag dropdown to any input, detects the user's country, ...
Read more >
Get the full number using intlTelInput - Stack Overflow
Use the getnumber option, so in your case: var intlNumber = $("#phone").intlTelInput("getNumber");. ^ This will give you the entire number ...
Read more >
How to build international phone number input in HTML and ...
This blog post will walk through how to build a phone number input field to process and parse international phone numbers using basic...
Read more >
Calling International Numbers From The U.S. - Boss Revolution
How to call abroad from a cellphone and landline, international calling plans ... The company also offers international calling plans with a set...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found