$(document).ready(function(){
  $("#add-config").on("click",function(){
    let rowSettings = document.querySelector("#rowSettings");
    let divCol12 = document.createElement("div");
    divCol12.className = "col-12";

    let inputHidden = document.createElement("input");
    inputHidden.type = "hidden";
    inputHidden.value = "new";
    inputHidden.name = "id[]";

    let divContainerFluidP2 = document.createElement("div");
    divContainerFluidP2.className = "container-fluid p-2";

    let divRow = document.createElement("div");
    divRow.className = "row";

    let divCol6One = document.createElement("div");
    divCol6One.className = "col-6";

    let divCol6Two = document.createElement("div");
    divCol6Two.className = "col-6";

    let inputKey = document.createElement("input");
    inputKey.type = "text";
    inputKey.name = "key[]";
    inputKey.className = "form-control";

    let inputValue = document.createElement("input");
    inputValue.type = "text";
    inputValue.name = "value[]";
    inputValue.className = "form-control";
  
    divCol6One.appendChild(inputKey);
    divCol6Two.appendChild(inputValue);

    divRow.appendChild(divCol6One);
    divRow.appendChild(divCol6Two);

    divContainerFluidP2.appendChild(divRow);
    
    divCol12.appendChild(inputHidden);
    divCol12.appendChild(divContainerFluidP2);

    rowSettings.appendChild(divCol12);
  });
});