• 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 controller function parameters

Phpunit partial mock + proxy Entity

Transpose and flatten two-dimensional indexed array where rows may not be of equal length

How to access a var with "-" in PHP [duplicate]

Prestashop webservice API creating cart rules

carbon generated datetime not stored correctly into the database

Fatal error: Uncaught TypeError: count(): Argument #1 ($var) must be of type Countable|array, null given in

How can I get a div content in php

Check if my GET request has Header: Token

How to install PHP composer inside a docker container

"Unable to load dynamic library 'pdo_sqlsrv.so' "Cenos7 PHP7.2.10

google content api for shopping

Can I use a WooCommerce function without any WooCommerce page?

Failed user login on production server using Symfony framework (Authentication request could not be processed due to...)

Laravel php artisan serve to mimic HTTPS

About Contact Privacy policy Terms and conditions