Hi everyone.
I’m building a form page, and one of the input boxes is optional. If the user enters text into it, I want another input box to appear for more data to be entered. Basically, I just need help setting up the Javascript to get this done.
I was planning on having the input box that’s going to appear be set to display:none with CSS, and then use a Javascript method change the DOM to make it display:block once the user enters text in the optional field. But the problem I’m having is I’m not sure how to tell when the user has entered text there. I understand there’s an onClick method for most elements, but I don’t know of anything like onTextEntered. Can someone help me with how I determine when text has been entered into that box?