I intend to hide each of the 3 buttons until the 2 inputs on top of each button are filled, I had already tried to do it and it works, but if I try to add more than once it is always visible even with nothing in input
<div id="addElements">
<input type="text" name="exame" id="examedisciplina" placeholder="Nome da disciplina">
<input type="date" id="dataExame" >
<button type="button" id="add_exame" onclick="addToTableExame()" >Adicionar Exame</button>
<input type="text" name="teste" id="testedisciplina" placeholder="Nome da disciplinas">
<label id='label5'>Data:</label> <input type="date" id="dataTeste" >
<button type="button" id="add_teste" onclick="addToTableTeste()">Adicionar Teste</button>
<input type="text" name="trabalho" id="trabalhodisciplina" placeholder="Nome da disciplinas"><p></p>
<label id='label6'>Data:</label> <input type="date" id="dataTrabalho" >
<button type="button" id="add_trabalho" onclick="addToTableTrabalho()">Adicionar Trabalho</button>
</div>