Answers for "phone number field"

2

phone number input

JS Libraries required :
======================
https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js
https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/8.4.7/js/intlTelInput.js

Inside JS File :
================
$("input").intlTelInput({
  utilsScript: "https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/8.4.6/js/utils.js"
});

Inside HTML File :
===================
<h1>International Telephone Input - BOOTSTRAP INPUT GROUP</h1>
<form>
  <div class="input-group">
    <input type="tel" class="form-control">
    <span class="input-group-addon">Tel</span>
  </div>
  <br>
  <div class="input-group">
    <input type="tel" class="form-control">
    <span class="input-group-addon">Tel</span>
  </div>
</form>

Inside Css File :
=================
body {
  margin: 20px;
}
form {
  width: 300px;
}

// workaround
.intl-tel-input {
  display: table-cell;
}
.intl-tel-input .selected-flag {
  z-index: 4;
}
.intl-tel-input .country-list {
  z-index: 5;
}
.input-group .intl-tel-input .form-control {
  border-top-left-radius: 4px;
  border-top-right-radius: 0;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 0;
}
Posted by: Guest on July-06-2020
0

phone number field

from phonenumber_field.modelfields import PhoneNumberField

class MyModel(models.Model):
    name = models.CharField(max_length=255)
    phone_number = PhoneNumberField()
    fax_number = PhoneNumberField(blank=True)
Posted by: Guest on May-15-2021
0

phone number field

pip install django-phonenumber-field[phonenumberslite]
Posted by: Guest on May-15-2021
0

phone number field

pip install django-phonenumber-field[phonenumbers]
Posted by: Guest on March-17-2021
0

phone number field

INSTALLED_APPS = [
    ...
    'phonenumber_field',
    ...
]
Posted by: Guest on May-15-2021

Code answers related to "phone number field"

Python Answers by Framework

Browse Popular Code Answers by Language