Lookup field and barcode scan auto enter

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
amyat
Veteran Member
Posts: 45
Joined: 2020-06-24 20:39

Lookup field and barcode scan auto enter

Post by amyat » 2022-05-15 04:12

table view quick search is directly working when barcode scan.
No need press enter .

i want to like that on select2 lookup fields
auto enter when only barcode scan

that is possible?

Question2 - barcode scanner with (Enable Auto Enter ) is not working on select2 box?

my trying code is
auto enter when select2 box search and result is the same

Code: Select all

 $j('#item_box-container').on('select2-open',function (e){
   setInterval (function(){
                if($j('#s2id_item_box-container').data('select2').search.val().length){
                var search = $j('#s2id_item_box-container').data('select2').search.val();
                var result = $j('.select2-results .select2-highlighted').text();
                          if(search == result.split('/')[0]){
                           //$j('#item_box').val( result.id );
                          //i can't find select2-result id
                           $j('#s2id_item_box-container').select2('close');
                           $j('#item_box-container').change();
                         }
            } 
       },5000);
}); 
please help me
thank you

Post Reply