add and remove form elements

add and remove form elements

Hi thanks for taking to the time to help me on this. I have some jquery code (see below) 

  1.     var max_fields      = 10; //maximum input boxes allowed
  2.     var wrapper         = $(".input_fields_wrap"); //Fields wrapper
  3.     var add_button      = $(".add_field_button"); //Add button ID    
  4.     var x = 1; //initlal text box count
  5.     $(add_button).click(function(e){ //on add input button click
  6.         e.preventDefault();
  7.         if(x < max_fields){ //max input box allowed
  8.             x++; //text box increment
  9.             $(wrapper).append('<div class="col-xs-12"><div class="row"><div class="col-xs-9"><div class="form-group"><label>Postage Description:</label><input type="text" class="form-control" value=""/></div><!-- form-group --></div><!-- col-xs-9 --><div class="col-xs-2"><div class="form-group"><label>Postage Price:</label><input type="text" class="form-control" value=""/></div><!-- form-group --></div><!-- col-xs-2 --><div class="remove_field"><span class="glyphicon glyphicon-remove"></span><div></div><!-- row --></div><!-- col-xs-12 -->'); //add input box
  10.         }
  11.     });    
  12.     $(wrapper).on("click",".remove_field", function(e){ //user click on remove text
  13.         e.preventDefault(); $(this).parent('div').remove(); x--;
  14.     })

the code adds html which contains form elelments (input) is there anyway to add name="" and id="" to each form field? preferably with a prefx? something like;

var prefix      = anything

so when the plus sign is clicked to add the elements to the dom the input fields would have name="anything_01" id="anything_01" then the next one which is added has name="anything_02" id="anything_02" etc... etc...

help much appreciated.

Many thanks