I have more than 1 link in my page. When I click the link, the input element shows up as shown in the demo below.
However, if I put 2 links it doesn't work.
I am pretty sure that problem is that I am repeating the id="barcode", which supposed to be used only once, but I couldn't find how I can resolve this.

<https://jsfiddle.net/w3oz0txq/4/>

```html
<script type="text/javascript">
  function show() {
    document.getElementById("barcode").style.display = "block";
  }

</script>
<br>
<a href="javascript:void(0);" onclick="show();">Please type barcode 1</a>

<div id="barcode" style="display: none">
  <input type="text" name="barcode_values[]">
</div>
<br>
<a href="javascript:void(0);" onclick="show();">Please type barcode 2</a>

<div id="barcode" style="display: none">
  <input type="text" name="barcode_values[]">
</div>
```