• 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

Cross-Origin Resource Sharing (CORS) witth Laravel and Vuejs

phpunit - testing is painfully slow

Image upload not working through ajax Laravel

find in set in laravel ? example

What is the function of the (new Date()).getTime() in PHP?

Why do I have invalid argument supply for foreach in Laravel for json response? [duplicate]

How to change 'users' auth table and use another instead Laravel

Batch request Google Calendar php API

Adding Multiple Custom Post Types in Wordpress

Laravel websockets AWS EC2 - Connection failed

Detect a fetch request in PHP

Pagekite error: FAIL: localhost:8080 is down

How to get an Array value inside an object in an array Php [duplicate]

How to fix Call to undefined method AppModelsTableName::factory?

How to delete old images from public folder on update using Laravel

About Contact Privacy policy Terms and conditions