• 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

Execute only one time and then wait set period of time before executing again

Dynamic table in HTML using MySQL and php

Laravel Multi-language routes without prefix

Refresh specific HTML content that retrieves data from MySQL

Ajax GET request fails in laravel 8

Composer Curl error 60: SSL certificate problem: unable to get local issuer certificate

Laravel print last executed SQL query with Query log

Use Python plotly chart in PHP

No result using makeStyles Material UI in react 18

I want to display default profile image if user do not have profile image

ORA-12546: TNS:permission denied error connection to remote oracle server

How to show selected value using javascript in laravel

*** ERROR *** The PHP configuration loaded file is: c:/wamp64/bin/php/php8.1.0/php.ini - should be: c:/wamp64/bin/apache/apache2.4.53.1/bin/php.ini

Laravel: Create morphs() relationship nullable

How to get AJAX to post on second page?

About Contact Privacy policy Terms and conditions