• 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

Laravel Pagination links() not working

PHP function Not Working As Expected From functions.php Include File

With doctrine ODM, can I embed many subdocuments in a main document?

How to write PHP in XSLT

How to upload mpdf file after generating to s3 bucket in php

How to put php code inside opening and closing shortcodes

How to implement placeholder in a php file for moodle plugin?

How to use PHPCBF to fix one issue at a time?

MySQL upgrade causing unexpected results on simple WHERE clauses

301 Redirect to remove query string on homepage only

Composer fails with kylekatarnls/update-helper on new homestead

Laravel no logout option from menu after successfull login

Display Brand Name Above Product Title in Woocommerce Cart, Checkout Page, Orders and Email Notification

PHP: How to raise number to (tiny) fractional exponent?

PHP Form Not Inserting

About Contact Privacy policy Terms and conditions