javascript - Dynamically Add Form Fields and Update Field Value -
i have form can add fields: http://jsfiddle.net/ytrkqr6a/2/ $(document).ready(function() { var max_fields = 32; //maximum input boxes allowed var wrapper = $(".cameras"); //fields wrapper var add_button = $(".add-camera"); //add button id var x = 1; //initlal text box count $(add_button).click(function(e){ //on add input button click e.preventdefault(); if(x < max_fields){ //max input box allowed x++; //text box increment $(wrapper).append('<div class="form-group"><input type="text" name="camera '+ x +'" value="camera '+ x +'" placeholder="camera '+ x +'" class="form-control cameras" readonly /> <a href="#" class="remove-camera">remove</a></div>'); //add input box } }); $(wrapper).on("click",".remove-came...