Checkout my full post here.. on the workaround. If you have any question. please drop a comment, i ll will reply
https://github.com/jackocnr/intl-tel-input/issues/1020
for those who are having issue on woocommerce ajax checkout update call, **i faced this when using Woocommerce deposit, i updated to check if there's any post data on form initialization, if yes, i will reassigned the variable value.
Example:
https://github.com/jackocnr/intl-tel-input/issues/1020
for those who are having issue on woocommerce ajax checkout update call, **i faced this when using Woocommerce deposit, i updated to check if there's any post data on form initialization, if yes, i will reassigned the variable value.
Example:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function init_tel(){ | |
$utils_url = plugins_url('/js/utils.js', __FILE__); | |
?> | |
<script> | |
var input = document.querySelector("#phone"); | |
var iti = window.intlTelInput(input,{ | |
utilsScript: "<?php echo $utils_url; ?>", | |
// the countries at the top of the list. defaults to united states and united kingdom | |
preferredCountries: [ "my", "us", "gb" ], | |
autoPlaceholder: null, | |
separateDialCode: true, | |
hiddenInput: "mobileNo" | |
}); | |
var hiddenInput = document.querySelector('#mobileNo'); | |
hiddenInput.value = "<?php echo $POST["mobileNo"];?>"; | |
</script> | |
<?php | |
} |
Comments
Post a Comment