• 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

Unable to uninstall brew php from homebrew

Twig - How to check if variable is a number / integer

dompdf and img tag, image wont show

Chunk and transpose a flat array into rows with a specific number of columns

How can I get user id from session in javascript?

Multiple order by in WooCommerce

PHP code for generating decent-looking coupon codes (mix of letters and numbers)

How to edit Records using CodeIgniter

Autoloading classes in PHPUnit using Composer and autoload.php

How can I create a Download Page with post php method?

How to add a heading in between checkout fields of WooCommerce

Testing subscription renewals on Stripe

Laravel lang slug in url

Not able to access model in the controller mautic

Call authenticate manually in router middleware

About Contact Privacy policy Terms and conditions