1
I intend to hide each of the 3 buttons until the 2 inputs that are on top of each button are filled , I had already tried and it works , but if I try to add more than once it is always visible even with nothing in the 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>
What the AP needs is to show/hide if each 2 inputs are filled. In your first example only check an input.
– Sergio
My idea was to hide the button and only appear when the 2 inputs are filled
– Força Chape
@I have changed example 1 so that you can check inputs, and still use the hidden button and show if the two fields are filled here an example http://jsfiddle.net/A7UbK/58/
– Leo Letto
The point is that one of the inputs is of the date type
– Força Chape
@Forcing only changes the input type to date, if the date is not filled in it will be recognized as a box and the button will not be shown http://jsfiddle.net/A7UbK/59/
– Leo Letto
the button is visible when I write in only 1
– Força Chape
Are you sure? for here at least in the fiddle it is only visible when the two fields are filled, and when I clear a field the button disappears
– Leo Letto