I made a form somewhere on an HTML page, but made its visibility hidden so that it wouldn’t appear immediately. I wanted to activate it through a button click, but then appear at where the button was clicked, so I set the “innerHTML” of the button div to that of the hidden form. The form appears, but it won’t allow me to enter any data into the fields (I’m assuming due to it being hidden somewhere else) so I’m wondering if there is a way around this? Or a better alternative?
Thanks
Replace the button with the form altogether. With jQuery, you could use
replaceWith():