我有一张<script type="text/template>
内的表格。我这样做了,因为我有一个具有动态字段和行编号的表单。一切正常,但我无法使用PHP提交表单数据。我已将脚本包装在表单标记中,广告已放置了提交按钮,但没有值传递到第二个脚本。如何从此模板中检索值?
<form id="frm" method="post" action="../book2.php">
<script type="text/template" id="categoryTemplate">
<div class="category" id="category{{ID}}">
<div class="container-fluid">
<h4 style="display:inline; text-align:left">Person {{ID}}</h4>
<div class="row">
<div class="form-group col-md-1">
<label for="title" class="control-label">Title</label>
<input type="text" value='' class="form-control" id="title" placeholder="Title">
</div>
<div class="form-group col-md-2">
<label for="fname" class="control-label">First Name</label>
<input type="text" value='' class="form-control" id="fname" placeholder="First Name" >
</div>
<div class="form-group col-md-2">
<label for="sname" class="control-label">Surname</label>
<input type="text" value='' class="form-control" id="sname" placeholder="Surname" >
</div>
</div>
</div>
</div>
</script>
<input class="submit" type="submit" name="submit2" value="Submit">
</form>