send number with country code in form
parent
1ad1ed3174
commit
ffc413d1c8
|
@ -12,8 +12,9 @@ function getAddressFiedlValue(addressComponents, $field){
|
|||
}
|
||||
|
||||
let input = document.querySelector("#ctelefon");
|
||||
let iti = null;
|
||||
if(input != undefined){
|
||||
let iti = window.intlTelInput(input, {
|
||||
iti = window.intlTelInput(input, {
|
||||
initialCountry: "de",
|
||||
preferredCountries: ["de"],
|
||||
geoIpLookup: function(callback) {
|
||||
|
@ -65,8 +66,6 @@ function updateProducts(){
|
|||
}
|
||||
}
|
||||
|
||||
// iti.getNumber();
|
||||
|
||||
$(window).on('load', function(){
|
||||
updateProducts();
|
||||
$("#successful-submitting-form").delay(4000).slideUp(200, function() { $(this).alert('close'); });
|
||||
|
@ -81,6 +80,7 @@ $(window).on('load', function(){
|
|||
});
|
||||
let cart = products.join(" - ")+" - Gesammt: "+numberToEuroFormat(totalPrice);
|
||||
$('#ccart').val(cart);
|
||||
$('#ctelefon').val(iti.getNumber());
|
||||
objProducts = [];
|
||||
localStorage.setItem("products", JSON.stringify(objProducts));
|
||||
form.unbind('submit').submit();
|
||||
|
|
Loading…
Reference in New Issue