• 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

Undefined Array Key error when uploading image on php

Star rating with half star support

Additional price based on cart item count in WooCommerce

virtctl works when executed via command line but not from php exec()

unable to load your default controller on Codeigniter

Symfony - "framework.test" config is not set to true

how to check version of codeigniter framework?

Any AWS EB Laravel route getting 404 Not Found nginx/1.16.1

Valet, Xdebug after reboot Big Sur not working

Popup Window and PHP form

Can't call javascript alert alertify library from PHP

PHP -> Next nearest date defined by array of days in week

Laravel Pagination links() not working

How can i call a function that executes an fpdf based on the choice of a form selector?

How to add a custom field to all Woocommerce attribute terms using add_action

About Contact Privacy policy Terms and conditions