0
Hello, I am making a form for college project and would like to know how to create a code block dynamically by pressing a button.
I have the code snippet below that is part of my form:
<div class="wrap-input bg-white">
<input class="input" name="empresa" type="text" placeholder="Qual foi a empresa?" />
</div>
<div class="wrap-input bg-white rs2-wrap-input">
<input class="input" name="cargo" type="text" placeholder="Qual foi seu cargo?" />
</div>
<div class="wrap-input bg-white rs2-wrap-input">
<label class="label-input">Entrada</label>
<input class="input" type="month" name="empresa_entrada" placeholder="Mês">
</div>
<div class="wrap-input bg-white rs2-wrap-input">
<label class="label-input">Saída</label>
<input class="input" type="month" name="empresa_saida">
</div>
<div class="wrap-input bg-white">
<textarea class="input" name="principais_atividades" rows="3"
placeholder="Descreva as principais atividades desempenhadas no cargo..."></textarea>
</div>
<button class="button">Adicionar outra experiência</button>
By clicking the button I would like to "duplicate" this block of inputs for the person to add a new experience.
How to do this, what do I want to do in Javascript?
Okay, I’ll try to do that. Thanks for the tip.
– SemicolonNotFound