• 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

Laravel websockets AWS EC2 - Connection failed

Results page in other window

How to get the survey List from surveygizmo API in the Postman?(Trial Version)

Best way to scrolldown onpageload

MySQL upgrade causing unexpected results on simple WHERE clauses

sort() not affecting original array while inside foreach loop

PHPSpreadsheet - How Do I Use Auto Migration Tool

Exact alternate to mcrypt_encrypt in PHP 7.2

Shortcode or PHP inside a shortcode in Wordpress

PHP mail function is sending blank message body

how to use extended ASCII instead of unicode in PHP

Get keys from associative array [duplicate]

How to convert binary string to normal string in php

Return new collection without modifying original collection

Warning: sqlite_query() expects parameter 1 to be resource, string given

About Contact Privacy policy Terms and conditions