0
Despite being new to the forum, I follow here for a long time and is always a great source of knowledge. But I do have a problem that I haven’t been able to solve yet. I am creating an occurrences logging system, where I created the fields of the first occurrence in this way:
<div class="box-programacao-rede" id="box-programacao-rede-2">
<div class="col-5 col-sm-5 col-md-5 col-lg-5 col-xl-5">
<textarea class="form-control textarea-ocorrencias" rows="1" name="ocorrencias-programacao-rede-2" id="ocorrencias-programacao-rede-2" placeholder="Ocorrência 2"></textarea>
</div>
<div class=" col-2 col-sm-2 col-md-2 col-lg-2 col-xl-2 cb-programacao-rede" id="div-cb-programacao-rede-2">
<i class="fa fa-angle-double-left fa-3x"></i>
<input type="checkbox" class="cb-programacao-rede" id="cb-programacao-rede-2" /><label for="cb-programacao-rede-2" data-on-text="Resolvido" data-off-text="Em aberto"></label>
<div class="btn-programacao-rede-icon"></div>
<i class="fa fa-angle-double-right fa-3x"></i>
</div>
<div class="col-5 col-sm-5 col-md-5 col-lg-5 col-xl-5">
<textarea class="form-control textarea-ocorrencias" rows="1" name="acoes-programacao-rede-2" id="acoes-programacao-rede-2" placeholder="Ação Corretiva para ocorrência 2"></textarea>
<form>
<div class="form-group uploadFiles">
<input type="file" multiple id="uploadFileOcorrenciaPgmRede2"></input>
</div>
</form>
</div>
</div>
As the idea of the project is to provide a limit of 15 fields at most, I would not like to leave them always pre-created and loaded in the DOM... I would like them to be created dynamically by JS.
It is possible for me to store this code, written this way, using Javascript and when the user clicked on a button, he added this content to the page?
Excellent, Pablo! It worked right... Thank you so much for your help! Great hug
– rdelgado