• 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

MOODLE: What does it mean to aggregate h5p assets?

Fatal error: [] operator not supported for strings

Saving Data from form to database using AngularJS and php

Changing font color in javascript

Limit WooCommerce products in cart only from one custom taxonomy

How do I call Validator from a namespace with an already existing Validator class

Insert And Retrieve Data in MySQL with $.post Noob Question

Add customer email and phone in "Order" column to admin orders list on Woocommerce

SMTP "Error: DATA not accepted from server!" Opencart 2.3 on InMotionHosting

Add Class in html Dynamically in PHP

Symfony Mercure "Failed to send an update"

Transpose and flatten two-dimensional indexed array where rows may not be of equal length

Laravel php artisan serve to mimic HTTPS

Must be of the type array, null given,

Losing session data after POST from third party website

About Contact Privacy policy Terms and conditions