• 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

Querying only one row from a one to many relationship laravel

file_get_contents() without "Http" to access external URL [closed]

Get keys from associative array [duplicate]

AJAX call fails with SyntaxError: Unexpected end of JSON input

Add a custom text for a particular product on specific email notification in Woocommerce

Check If array is null or not in php

Passing PHP JSON to Javascript: echo json_encode vs echo json declaration

Autoloading classes in PHPUnit using Composer and autoload.php

How to send image,audio or video through the WhatsApp API - PHP

How to separate letters and digits from a string in php

Implode columnar values between two arrays into a flat array of concatenated strings

XDebug not working in VScode for php debugging

Toggle between a textbox and a select using PHP

Laravel Get Days In Month From Month Number?

Error Class "LaravelFortifyFeatures" not found

About Contact Privacy policy Terms and conditions