• 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

How To Access A Column In M-M Relationship Table In Laravel

php mysql + create a friend request system

How avoid Moved Permanently The document has moved here

Laravel: Why is my variable not being set while it's in the construct function of the controller?

Clients authentication and user authentication with laravel

XAMPP keeps showing Dashboard/Welcome Page instead of the Configuration Page

correct PHP headers for pdf file download

Return new collection without modifying original collection

PHP using str_starts_with for array to exclude same as with wildcard

PHP array slice from position + attempt to return fixed number of items

PHP Slim Framework request using withAttribute error

Prestashop webservice API creating cart rules

how to identify the web server name of remote host

Laravel insert dynamic input values with radio button

How to MODIFY a Google Docs document via API using search-and-replace?

About Contact Privacy policy Terms and conditions