• 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

GRPC installed successfully on ubuntu but php is looking for it in another folder

Parameter is not sent to Laravel route in Ajax

VichUploaderBundle error "Expected argument of type "File", "NULL" given" when submitting the form without selecting any file

CONCAT columns with Laravel 5 eloquent

api response laravel doesn't show

Query Optimization, changing the queries in the loop into a single processing query

How to set a domain name with php artisan serve

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

Yii2 redirecting to previous page after login

Can I write PHP code across multiple lines per statement?

Insert database rows from columns of data from associative array of indexed arrays

Changing font color in javascript

How to create a cookie to store the timestamp of when a page is first loaded with php

Symfony run hint kernel.secret parameter not found

Star and Half Star Rating in Laravel

About Contact Privacy policy Terms and conditions