Hello Guys, Iwant to create a form builder using php and jquery, it is possible or not? This is my code.
<div id="form_gen">
<div class="">
<hr>
<h4>Create Database and Table</h4>
<table class="bar form_evalution">
<tr>
<th>Database Name:</th>
<td><input type="text" class="form-control" placeholder="Input Database Name"></td>
</tr>
<tr>
<th cols="auto">Table Name:</th>
<td><input type="text" class="form-control" placeholder="Input Database Name"></td>
</tr>
</table>
<hr>
</div>
<p>
<table for="form_gen" class="form_evalution">
<tr>
<th>Field</th>
<th>Input Label</th>
<th>Input Type</th>
<th>Input Name</th>
<th>Database Column Name</th>
</tr>
<tr>
<td>Field</td>
<td><input type="text" class="form-control" name="input_label" placeholder="Input Label"></td>
<td>
<select name="input_type" class="form-control">
<option value="text">Text</option>
<option value="radio">Radio Button</option>
<option value="checkbox">Check Box</option>
<option value="password">Password</option>
<option value="textarea">Textarea</option>
<option value="submit">Submit</option>
</select>
</td>
<td><input type="text" class="form-control" name="input_name" placeholder="Text input"></td>
<td><input type="text" class="form-control" name="input_tbl" placeholder="Input Database Column"></td>
</tr>
</table>
</p>
</div>
<input type="submit" name="generate" class="btn btn-warning pull-right" value="Generate"/>
</form>
<button onclick="javascript:void(0);" class="btn btn-warning" id="addField">Add New Field</button>
<hr>
<!---End of FORm Html--->
</div>
</div>
<div class="clearfix"></div>
<div class="clearfix"></div>
<div class="clearfix"></div>
<div class="clearfix"></div>
</div>
<div class="clearfix"></div>
<script src="js/jquery.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
$("button").click( function() {
$("#form_gen").append('<table class="bar form_evalution"><tr><td>Field</td><td><input type="text" class="form-control" name="input_label" placeholder="Input Label"></td><td><select name="input_type" class="form-control"><option value="text">Text</option><option value="radio">Radio Button</option><option value="checkbox">Check Box</option><option value="password">Password</option><option value="textarea">Textarea</option><option value="submit">Submit</option></select></td><td><input type="text" class="form-control" name="input_name" placeholder="Text input"></td><td><input type="text" class="form-control" name="input_tbl" placeholder="Input Database Column"></td><td><a href="javascript:void(0);" id="delete" class="remCF">Remove</a></td></tr></table>');
});
$("#form_gen").on('click','.remCF',function(){
$(this).parent().parent().remove();
});
});
</script>
And I dont know how to generate that by that code, can you help me to get that logic? or any tutorial? please guys, I need it to be done as my project. Thanks in Advance