我的表格是这样的。我已将field_name和field_values保存到MySQL表中。
我的数据库中的表格就像这样
ID | field_name |的 FIELD_VALUE
12 | field1 |示例文本
13 | field2 |剽窃
如何将这些值加载到“
下面的表单中我的意思是如何在页面加载时使用jQuery Ajax根据表和其他字段将field1的值更改为“Sample Text”?
此表单是在通过表单构建器构建时动态生成的。
<form id="form-preview" class="TTWForm" method="post" novalidate="">
<div id="field1-container" class="field f_100">
<label for="field1">
Comments
</label>
<textarea rows="5" cols="20" name="field1" id="field1" required="required"></textarea>
</div>
<div id="field2-container" class="field f_100 radio-group required">
<label for="field2-1">
Level of work
</label>
<div class="option clearfix">
<input name="field2" id="field2-1" value="Need Revisions" type="radio">
<span class="option-title">
Need Revisions
</span>
</div>
<div class="option clearfix">
<input name="field2" id="field2-2" value="Plagiarised" type="radio">
<span class="option-title">
Plagiarised
</span>
</div>
<div class="option clearfix">
<input name="field2" id="field2-3" value="Archive it" type="radio">
<span class="option-title">
Archive it
</span>
</div>
</div>
<div id="form-submit" class="field f_100 clearfix submit">
<input value="Submit" type="submit">
</div>
</form>