• 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

PHP -> Next nearest date defined by array of days in week

Adding multiple items to WooCommerce cart at once

The difference when using if statement true === something() vs something() === true [duplicate]

Apply filter array/return terms

Why does using salted hash on python and php give me different results?

laravel sanctum Route [login] not defined

Destroy session upon refresh

How to loop a tree array with unknown depth and get array blocks?

How can I get new CSRF token in LARAVEL by using ajax

How to get the total hour from starting time to end time in php

Laravel php artisan serve to mimic HTTPS

Using Associative arrays

Load a .env file with PHP

Prestashop webservice API creating cart rules

Distribute array row data to make multiple new rows

About Contact Privacy policy Terms and conditions