Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

261
Visualizações
intl-tel-input send hidden input send value to Google sheets

I have an HTML form using intl-tel-input for automatic country detection based on the IP.

I am trying to send the values of the form, but I am getting in Google sheets only the phone number without prefix

<form>
<input type="text" name="first_name" placeholder="First Name">
<input name="phone" type="tel" id="phone" placeholder="phone Number">
<input type="hidden" id="country" name="country">
</form>

this is the JS code

  var input = document.querySelector("#phone");
//   window.intlTelInput(input, {
//     // any initialisation options go here
//   });
  
  var iti = intlTelInput(input, {
  initialCountry: "auto",
  geoIpLookup: function(success, failure) {
    $.get("https://ipinfo.io", function() {}, "jsonp").always(function(resp) {
      var countryCode = (resp && resp.country) ? resp.country : "";
      success(countryCode);
    });
  },
});



var country = $('#country');
var iti = intlTelInput(input.get(0))

// listen to the telephone input for changes
input.on('countrychange', function(e) {
  // change the hidden input value to the selected country code
  country.val(iti.getSelectedCountryData().iso2);
});

Does Google sheets accepts input from hidden fields?

There is any way that I can get the country code separated or at least the full number (country_code+phone_number)

Thank in advance.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda