Using a Barcode in a order form

Using a Barcode in a order form

Hi

I have a form where customers can select which product they want to buy. There are
4 different products and for each a dropdown where can select 0 to 20 as quantity.

I want to be able to generate an unique barcode for each product. For example:

item1barcode1
item1barcode2
item2barcode1
item2barcode2
....

So each time a customer buys products the barcode should be unique (sort of increment)

Is this possibe and how?

Kind regards