• 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 in Laravel run JavaScript code stored in php variable?

Split array into 4-element chunks then implode into strings

get data-value with variable value

PHP Include for HTML?

How to solve Duplicate entry '0' for key 'PRIMARY' in Wordpress?

SQL AVG() to 2 decimals

Encrypt in php and decrypt in Dart(flutter)

advanced custom fields wordpress custom class

Install mysql client in docker image

Get orders by date and status woocommerce

Having issue with matching rows in the database using PDO

Laravel You requested 1 items, but there are only 0 items available

Symfony run hint kernel.secret parameter not found

how to create html table in php

Malformed MIME header error in Symfony 5.3

About Contact Privacy policy Terms and conditions