如何使用<input>更改我的<select>以使用条形码扫描仪

I'm about to change a script, and right know the script are using an <select> with one options and echo to be used to show the products.

Now I'll like to change the <select> to a <input> so I can scan a barcode, and the information from the product should be added to the DB as it is right now, but I'm lost, I have used several hours to figuere out how to change it, I thought the solution was to use a hidded but then I can't add the first knowen product to my list.

Could someone please help me? :)

I've tried to use more boxes to get the products, but that was a big mess.

 <div class="col-md-6">
  <div class="form-group">
    <label for="date">Product Name</label>
    <select class="form-control select2" name="prod_name" tabindex="1" autofocus required>
      <?php
        $branch=$_SESSION['branch'];
        $cid=$_REQUEST['cid'];

        include('../dist/includes/dbcon.php');

        $query2=mysqli_query($con,"select * from product where branch_id='$branch' order by prod_name")or die(mysqli_error());

          while($row=mysqli_fetch_array($query2)){
            ?>
            <option value="<?php echo $row['prod_id'];?>"><?php echo $row['prod_name']." Available(".$row['prod_qty'].")";?></option>
          <?php }?>
    </select>

      <input type="hidden" class="form-control" name="cid" value="<?php echo $cid;?>" required>   
    </div><!-- /.form group -->
  </div>
  <div class=" col-md-2">
    <div class="form-group">
      <label for="date">Quantity</label>
      <div class="input-group">
        <input type="number" class="form-control pull-right" id="date" name="qty" placeholder="Quantity" tabindex="2" value="1"  required>
      </div><!-- /.input group -->
    </div><!-- /.form group -->
  </div>
  <div class="col-md-2">
    <div class="form-group">
      <label for="date"></label>
      <div class="input-group">
        <button class="btn btn-lg btn-primary" type="submit" tabindex="3" name="addtocart">+</button>
      </div>
    </div>

The code should be changed to use a <input> or something simular, so I can use a barcode scanner to add my items to a list.

What I did to get my result was:

I changed the prod_id to be the barcode, and on scan the form is submitted to a temp_db, to show every items, and then added a "finish db" called inStock, and everything was as it should be! :)

/Kenneth