-3

So wanted to get an input from a external device(barcode-scanner, RFID-reader etc) and I want the input to be hidden while scanning

I tried using "hidden" inside the input tag but it only makes the field disappear and make it unable to input anything..

I was hoping to the input without totally removing it

little rebel
  • 37
  • 1
  • 9
  • 2
    Can you share enough of your [mcve] code, and how you're handling, processing and gathering the data from the scanner? Should the `` be revealed once the scan has been performed? – David Thomas Aug 29 '19 at 11:47
  • I believe if you are able to read when the input is done change the class. For example to , in css you set their attribute to display:inline(shown) or display:none(hidden). See https://stackoverflow.com/questions/1078451/make-input-invisible-through-css – darclander Aug 29 '19 at 11:55

2 Answers2

1

Hi please try using disabled

<input type="submit" value="Submit" disabled>

if this is not the intended behaviour, try using style="display:none", this will hide it away entirely. You can then set it to block to get it back https://www.w3schools.com/CSSref/pr_class_display.asp

If you wish to accept server input but disable user input the readonly tag would help

<input name="readonly" value="readonly" readonly>
Discord expert
  • 178
  • 1
  • 15
  • Could you explain a bit more why this answer would resolve the problem and what diabled actually does with the input tag? – darclander Aug 29 '19 at 11:50
1

Its fixed.. I just put a negative 999 z-index and postion: relative inside the input.. seems to work nice as I'm Expecting

The scanner acts as a input keyboard with an auto submit on it if its on a form tag..

little rebel
  • 37
  • 1
  • 9