-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

2
  • 2
    Can you share enough of your minimal reproducible example code, and how you're handling, processing and gathering the data from the scanner? Should the <input> be revealed once the scan has been performed? Commented Aug 29, 2019 at 11:47
  • I believe if you are able to read when the input is done change the class. For example <input class="hidden"> to <input class="shown">, in css you set their attribute to display:inline(shown) or display:none(hidden). See stackoverflow.com/questions/1078451/… Commented Aug 29, 2019 at 11:55

2 Answers 2

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>
Sign up to request clarification or add additional context in comments.

1 Comment

Could you explain a bit more why this answer would resolve the problem and what diabled actually does with the input tag?
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..

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.