1

that react htmlFor isn't hidding input field with label. Maybe someone could tell me, what I am doing wrong?

My code:

<input name="tes" id="tes" type="file" className="inputfile" />
             <label htmlFor="tes">
                 <span>Upload</span>
             </label>
PrEto
  • 395
  • 2
  • 7
  • 23

1 Answers1

0

EDIT

You told me in comments, you want to hide the input tag. Just add the attribute style="display:none" to your input tag.

Like this:

 <input name="tes" id="tes" type="file" className="inputfile" style="display:none"/>
Jakob
  • 1,858
  • 2
  • 15
  • 26