title: Remove field not working as expected
body: <p>I have a code that adds or removes fields when clicked, but when i bound it in a c:foreach tag, it shows unexpected behaviour, as instead of showing a remove field it shows an add field with textfield when i load the data from backend?</p>
  
  <pre><code>&lt;script&gt;
  $(document).ready(function() {
      var max_fields      = 10; //maximum input boxes allowed
      var wrapper         = $(".input_fields_wrap"); //Fields wrapper
      var add_button      = $(".add_field_button"); //Add button ID
  
      var x = 1; //initlal text box count
      $(add_button).click(function(e){ //on add input button click
          e.preventDefault();
          if(x &lt; max_fields){ //max input box allowed
              x++; //text box increment
              $(wrapper).append('&lt;div&gt;&lt;input type="text" name="parameter_value" size="50" style="width: 50%;; margin-left: 3%;" class="headers " value="${workflow.parameter_value}" /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="#" class="remove_field bttn"&gt;Remove&lt;/a&gt;&lt;/div&gt;'); //add input box
          }
      });
  
      $(wrapper).on("click",".remove_field", function(e){ //user click on remove text
          e.preventDefault(); $(this).parent('div').remove(); x--;
      });
  });
  &lt;/script&gt;
  
  
  &lt;table&gt;
  &lt;tr&gt;
  &lt;td class="tbody_color"&gt;
                  &lt;div class="input_fields_wrap"&gt;
                      &lt;c:if test="${not empty workflow.workflowParametersList}"&gt;
                          &lt;c:forEach var="paramValue" items="${workflow.workflowParametersList}"&gt;
                              &lt;input type="text" name="parameter_value" size="50" style="width: 50%;; margin-left: 13%;" class="headers" value="${paramValue.param_value}"&gt;&lt;/input&gt;
                              &amp;nbsp;&amp;nbsp;&lt;button class="add_field_button bttn"&gt;Add Parameters&lt;/button&gt;
                          &lt;/c:forEach&gt;
                      &lt;/c:if&gt;
                      &lt;c:if test="${empty workflow.workflowParametersList}"&gt;
                          &lt;input type="text" name="parameter_value" size="50" style="width: 50%;; margin-left: 13%;" class="headers" value=""&gt;&lt;/input&gt;
                          &amp;nbsp;&amp;nbsp;&lt;button class="add_field_button bttn"&gt;Add Parameters&lt;/button&gt;
                      &lt;/c:if&gt;
                  &lt;/div&gt;                          
              &lt;/td&gt;
  &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>