Back

Example: Multiple Instances

Here you can see multiple instances of the plugin working alongside each other. I've set the placeholderNumberType differently for each instance to highlight that the instances are completely independent of each other.

Markup

Home: <input id="home" type="tel">
<br><br>
Mobile: <input id="mobile" type="tel">

Code

var inputHome = document.querySelector("#home");
var inputMobile = document.querySelector("#mobile");

window.intlTelInput(inputHome, {
  initialCountry: 'gb',
  placeholderNumberType: 'FIXED_LINE',
  utilsScript: "../../build/js/utils.js?1549804213570" // just for formatting/placeholders etc
});
window.intlTelInput(inputMobile, {
  initialCountry: 'gb',
  placeholderNumberType: 'MOBILE',
  utilsScript: "../../build/js/utils.js?1549804213570"
});

Result

Home:

Mobile: