file input element doesnt work if its inside a form
i have an interesting question. i have a pretty big dynamic form that im managing rhf. one of these form elements wants to allow the user to submit a picture. Inside this I have a button to submit a new picture:
The problem is that the file input isnt triggered as long as this element exists within the form. I tried moving it outside and it seems to work. Any idea how i can get the input to trigger when i click the label?
2 Replies
Nevermind. this issue was caused by a event.preventDefault on an onClick listener on the parent