• 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 insert data into select2 search input after scan using qrcode

javascriptphpcodeigniterjquery-select2


PHP Snippet 1:

$('#add_order').select2();

PHP Snippet 2:

$(function(){
  //Your script
  console.log($('#add_order').lenght);//should display 1!
  $('#add_order').select2();
   :
   :
});

PHP Snippet 3:

$('#add_order').val("yourvalue").trigger("change");

Related Snippets

PHP: How to solve ob_start() in combination imagepng() issue?

best way to store error messages in Laravel (session or variable)

Shortcode or PHP inside a shortcode in Wordpress

Symfony Make:Migration : The metadata storage is not up to date, please run the sync-metadata-storage command to fix this issue

Utf8 encoding issue with Laravel

Clear javascript source cache laravel 5.8

Make Shipping Method fields Mandatory on Woocommerce checkout page

How to programmatically find public properties of a class from inside one of it's methods

stay with the last 15 elements of an array [duplicate]

Using PHP to connect to a remote MSSQL database

phpseclib 2.0 can not use Composer to create autoload

How do I loop through an MS SQL database with VB.NET?

Remove product downloads section in woocommerce email notifications

How To Access A Column In M-M Relationship Table In Laravel

How to access a var with "-" in PHP [duplicate]

About Contact Privacy policy Terms and conditions