I need to show a form using a button, and hide it when the user presses another button, because the other button shows another form. I did a similar thing with a select box,
There's the global attribute called hidden
. But I'm green to all this and maybe there was a reason it wasn't mentioned yet?
var someCondition = true;
if (someCondition == true){
document.getElementById('hidden div').hidden = false;
}
https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/hidden