• 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

How to send image,audio or video through the WhatsApp API - PHP

Getting output of MS stored procedure on php call

How can i hide dt if dd got empty value

Backend cannot be reached after Typo3 login screen

WAMP Virtual Host not working

Required field only if another field has a value, must be empty otherwise

Two buttons one form

how to insert data into select2 search input after scan using qrcode

PHPSpreadsheet - How Do I Use Auto Migration Tool

PHP, how to convert Int value to Week days

Best way to scrolldown onpageload

Warning: mysqli_stmt::bind_param(): Number of elements in type definition string doesn't match number of bind variables 11 [closed]

How to give apache permission to write to home directory?

How do I truncate a decimal in PHP?

args[max_input] woocommerce if statement confused

About Contact Privacy policy Terms and conditions