I need to connect a button with a textarea though they are not connected in a form.
My requirement? I need the button when clicked to check if the textarea is empty using the default required tag.
If clicking the button, and the textarea is empty, it needs to show the default error generated by the browser. I think Chrome etc says something like "This field is required".
Just connecting them in a form would make it easy, but it is not possible to connect them in a form-tag.
Makes sense? Maybe using JS?
Thanks!