How to do so that a new input is added when a button is pressed and it changes the value of an input: For example, if Before evaluations 1 now say Evaluations 2 ?. I explain myself more in detail .. I will have some capture first so you can understand better.
Each press on the "More +" button adds a new field (This is a form). But I can not find the way to say "Evaluation" for each field that is added, this one changes in number, ie:
Evaluation 1
Evaluation 2
Evaluation 3
$(function(){
$("#adicional").on('click', function(){
$("#tabla tbody tr:eq(0)").clone().removeClass('fila-fija').appendTo("#tabla");
});
$(document).on("click",".eliminar",function(){
var parent = $(this).parents().get(0);
$(parent).remove();
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<form method="post">
<div class="panel-heading mb-4">
<h3 class="panel-title">Registrar plan de evaluación</h3>
<select class="form-control" id="exampleFormControlSelect1" name="tipo">
<option value="Oratoria">Oratoria</option>
</select>
</div>
<table class="table table-striped" id="tabla">
<thead>
<tr class="fila-fija">
<td>Evaluación</td>
<td>Ponderación</td>
<td>Actividad a realizar</td>
<td></td>
</tr>
</thead>
<tbody>
<tr class="fila-fija">
<td><input type="text" id= "evaluacion" class="form-control" value="Evaluacion 1" disabled /></td>
<td>
<select class="form-control" id="exampleFormControlSelect1" name="tipo">
<option value="5">5%</option>
<option value="10">10%</option>
<option value="15">15%</option>
<option value="20">20%</option>
<option value="25">25%</option>
</select></td>
<td><input type="text" class="form-control" placeholder="Actividad que se realizara"/></td>
<td class="eliminar"><input type="button" class="btn btn-danger" value="Menos -"/></td>
</tr>
</tbody>
</table>
<div class="btn-der">
<input type="submit" name="insertar" value="Registrar" class="btn btn-primary"/>
<button id="adicional" name="adicional" type="button" class="btn btn-warning"> Más + </button>
</div>
</form>