• 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

Add Class in html Dynamically in PHP

Symfony there are no commands defined in the "make" namespace

Cannot retrieve error message using Symfony HttpClient if the response is not "ok"

Saving Data from form to database using AngularJS and php

OAuth2 Token PHP

500 Internal Server Error on Ajax request. Not sure the origin of the problem

PHPMetrics option --excluded-dirs="myfolder" : myfolder dir is not excluded within docker

How to test a php login connected to a mysql db through xampp?

Display specific shipping method if woocommerce product has specific acf field value

carbon generated datetime not stored correctly into the database

Is there a way to use the same parameter into multiple place in the same query with Eloquent? [duplicate]

Xdebug can't connect back to Docker host

MySQL order by field in Eloquent

merging two arrays with specified index

Combine array with same value and add other [duplicate]

About Contact Privacy policy Terms and conditions