• 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

JQuery content editable div and text box on submit not sending POST

Unable to run composer install

javascript html popup window

how to fix Service provider class not found when using repository?

Natural ORDER in Laravel Eloquent ORM

error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure

Xdebug 3 not showing in phpinfo on m1 Monterey

Convert every two values of an associative array into key-value pairs

Mysqli multi query error

Lexik JWT authentication problem "Invalid credentials"

Add and update products to session cart in Laravel

Correctly determine if date string is a valid date in that format

How to use PHPCBF to fix one issue at a time?

how to hide previous markers when new markers added in google map javascript api

SilverStripe unable to populate multiple member Childs

About Contact Privacy policy Terms and conditions