• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

How to auto populate preferredCountries from intl-tel-input with db output

javascriptphpdatatablesbootstrap-4intl-tel-input


PHP Snippet 1:

preferedCountries = JSON.parse(data)
iti.destroy();
iti = window.intlTelInput(input, {
    separateDialCode: "true",
    autoHideDialCode: "true",
    autoPlaceholder: "polite",
    preferredCountries: preferedCountries,
    utilsScript: "https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/14.0.7/js/utils.js",
    customPlaceholder: function(selectedCountryPlaceholder, selectedCountryData) {
        return "e.g. " + selectedCountryPlaceholder;
    }
});

Related Snippets

Google Calendar API batch request PHP

Uncaught TypeError: Cannot read property 'length' of null when retrieving tags from wp

Backend cannot be reached after Typo3 login screen

args[max_input] woocommerce if statement confused

browsersync doesn't work with XAMPP

Redis Command To Sort Keys

PHP: How to raise number to (tiny) fractional exponent?

How can I make this nested location configuration use the correct path to call a php program?

How to programmatically find public properties of a class from inside one of it's methods

advanced custom fields wordpress custom class

PHP password_verify

Laravel no logout option from menu after successfull login

PHP Download MP3 files from directory on server

GRPC installed successfully on ubuntu but php is looking for it in another folder

Laravel - How to properly generate unique slugs from article titles?

About Contact Privacy policy Terms and conditions