• 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

Parsing JSON File to array in PHP

Laravel print last executed SQL query with Query log

Check if a string contain multiple specific words

Facebook PHP SDK - will not logout properly

Laravel lang slug in url

Image upload not working through ajax Laravel

Two buttons one form

Combine multiple columns into an array as one of the key in a results set

Limit login attempts in Laravel 5.7

How to change HTML structure inside WP <head>

Utf8 encoding issue with Laravel

I want to store data in new index as per my key in php [duplicate]

How to display table header in every page using FPDF library?

Laravel SQL query midnight time not showing

Is it possible to re-use an array taken from PHP via JSON in a $.ajax function?

About Contact Privacy policy Terms and conditions