我正在尝试制作一个表单生成器但是我被卡住了 . 使用下面的代码,我可以使表单(id = formLabel)可见,以键入生成的表单的标签,并提交此formLabel移动在生成的表单所在的另一个块中键入的标签 . 我的问题是:第一次提交标签时,会创建一个标签,但第二次创建两个新标签,第三次创建第三个标签......

谢谢你的帮助 !

//Hide the 3 forms
$("#formLabel,#formTxt,#formButton").hide();

//Clic on button label= form visible
$("#label").on("click", function() {
  $("#formLabel").show();
  $("#formTxt,#formButton").hide();

  //submit the form=move the label in a block named left, where the generated form will be.
  $("#formLabel").submit(function(e) {
    var labelEntre = $(".zone").val();
    $("<span style='margin:50px;' id='span' style='float:left;'>" + labelEntre + "</span>").appendTo($("#left"));
    e.preventDefault();
  });
});