• 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

Sort a multidimensional array by integer inside of a string value which is two levels down

Failed user login on production server using Symfony framework (Authentication request could not be processed due to...)

Select option from dropdown menu with PHP and mySql

How can i hide dt if dd got empty value

PHP sort array of objects by two properties

How to convert time from one timezone to another in PHP

Cut an arabic string

Only on Firefox "Loading failed for the <script> with source"

Adding multiple items to WooCommerce cart at once

Get WooCommerce products from specific category

Laravel 5.1 Unknown database type enum requested

How to separate letters and digits from a string in php

insert multiple rows in a saveall in cakephp

Check for PDO Results, If None Display Message, If Yes then Loop Through

dompdf and img tag, image wont show

About Contact Privacy policy Terms and conditions