• 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

Implode array with array of glue strings

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given [duplicate]

calling server using nusoap with complextype

how to youtube api data to print in toolset metabox using a button click before save-post

Laravel Collections. Is there some kind of assertStructure method?

Return multiple values from a function using mysqli_fetch_assoc [closed]

How to show selected value using javascript in laravel

how to search for a file with php

Having issue with matching rows in the database using PDO

Laravel database insert with combining array and string

Undefined variable in Laravel 8 project (php 7.4)

Mysqli Output to a table

Assets not referencing to public folder (Laravel)

Add custom text under order details on WooCommerce My account view order pages

Call to undefined function openssl_decrypt

About Contact Privacy policy Terms and conditions