Schedule a Call

Unlock the Power of the Best Healthcare CRM

// document.addEventListener('DOMContentLoaded', function () { // var input = document.querySelector("#mobile_code"); // var iti = window.intlTelInput(input, { // initialCountry: "auto", // geoIpLookup: function(success) { // fetch("https://ipapi.co/json") // .then(res => res.json()) // .then(data => success(data.country_code)); // }, // utilsScript: "https://cdn.jsdelivr.net/npm/intl-tel-input/build/js/utils.js" // }); // input.addEventListener("countrychange", function() { // document.querySelector("#country-code").value = iti.getSelectedCountryData().dialCode; // }); // }); // document.addEventListener('DOMContentLoaded', function () { // const input = document.querySelector("#mobile_code"); // if (!input) return; // const iti = window.intlTelInput(input, { // initialCountry: "auto", // separateDialCode: true, // ✅ keeps dial code + flag in SAME dropdown // preferredCountries: ["us", "in", "gb"], // customize your top countries // geoIpLookup: function(success) { // fetch("https://ipapi.co/json") // .then(res => res.json()) // .then(data => success(data.country_code)) // .catch(() => success("us")); // }, // utilsScript: "https://cdn.jsdelivr.net/npm/intl-tel-input/build/js/utils.js" // }); // // save dial code in hidden input before submit // const countryField = document.querySelector("#country-code"); // input.addEventListener("countrychange", function() { // countryField.value = "+" + iti.getSelectedCountryData().dialCode; // }); // // also set on load // countryField.value = "+" + iti.getSelectedCountryData().dialCode; // }); // document.addEventListener('DOMContentLoaded', function () { // const input = document.querySelector("input#mobile_code"); // ✅ ensure selector // if (!input) { // console.error("Phone input not found"); // return; // } // const iti = window.intlTelInput(input, { // initialCountry: "auto", // separateDialCode: true, // ✅ flag + code in same dropdown // preferredCountries: ["us", "in", "gb"], // geoIpLookup: function (success) { // fetch("https://ipapi.co/json") // .then(res => res.json()) // .then(data => success(data.country_code)) // .catch(() => success("us")); // }, // utilsScript: "https://cdn.jsdelivr.net/npm/intl-tel-input@18.2.1/build/js/utils.js" // }); // // update hidden field // const countryField = document.querySelector("#country-code"); // input.addEventListener("countrychange", function () { // countryField.value = "+" + iti.getSelectedCountryData().dialCode; // }); // countryField.value = "+" + iti.getSelectedCountryData().dialCode; // });