• 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 make autocomplete work in foreach php loop? (vscode, intellisense)

Reducing authentication calls on external API (Laravel 5.6)

if statement inside concatenation

Updating and Synchronizing Woocommerce Subscriptions to Custom Date

Need to display only array value in JSON output

PHP web3 ERC20 token function call

how to use extended ASCII instead of unicode in PHP

how to retrieve the first and last instance of a row in pdo dataset

How to Install Composer Require doctrine/dbal

Clear javascript source cache laravel 5.8

Laravel 5 controller sending JSON integer as string

Add Metadata, headers (Expires, CacheControl) to a file uploaded to Amazon S3 using the Laravel 5.0 Storage facade

how to search for a file with php

Laravel websockets AWS EC2 - Connection failed

Invalid value in field "itemtype" in Google Search Console

About Contact Privacy policy Terms and conditions