title: submitting form via email with dynamic fields
body: <p>Thank you in advance.</p>
  
  <p>The code now works exactly as I need it too but I'm not sure how to go about passing each new line to my .asp mail handler if all the input names are the same.  Where exactly in my code would I index the input boxes so that I can call them uniquely during submission and email themwith .asp mail handler?</p>
  
  <p>Thank you to the stackoverflow community for helping me troubleshoot the code I've written thus far!</p>
  
  <p>HTML</p>
  
  <pre><code>&lt;form role="form" action="/wohoo" method="POST"&gt;
      &lt;label&gt;Item&lt;/label&gt;
      &lt;div class="catalog-fieldset"&gt;
          &lt;div class="catalog-wrapper"&gt;
              &lt;div class="catalog-items"&gt;
                  &lt;ul&gt;
                      &lt;li&gt;Quantity:
                          &lt;input type="text" size="5" name="Qty[]"&gt;
                      &lt;/li&gt;
                      &lt;li&gt;Width:
                          &lt;input type="text" size="5" name="Width[]"&gt;
                      &lt;/li&gt;
                      &lt;li&gt;Height:
                          &lt;input type="text" size="5" name="Height[]"&gt;
                      &lt;/li&gt;
                  &lt;/ul&gt;
                  &lt;button type="button" class="remove-line"&gt;Remove&lt;/button&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;button type="button" class="add-field"&gt;Add More...&lt;/button&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>CSS</p>
  
  <pre><code>ul {
      list-style: none;
      display:inline-block;
      margin:0 0 5px;
  }
  ul li {
      display: inline-block;
  }
  .remove-line {
      display:inline-block;
  }
  </code></pre>
  
  <p>I have this code set up <a href="http://jsfiddle.net/KeithDickens/afqh4a5o/2/" rel="nofollow">http://jsfiddle.net/KeithDickens/afqh4a5o/2/</a></p>
  
  <pre><code>$(document).ready(function () {
  var max_fields = 10; //maximum input boxes allowed
  var x = 1; //initlal text box count    
  
  $('.catalog-fieldset').each(function () {
      var $wrapper = $('.catalog-wrapper', this);
  
      $(".add-field", $(this)).click(function (e) {
          e.preventDefault();
          if (x &lt; max_fields) { //max input box allowed
              x++; //text box increment        
              $('.catalog-items:first-child', $wrapper).clone(true).appendTo($wrapper).find('input').val('').focus();
          }
      });
      $('.catalog-items .remove-line', $wrapper).click(function () {
          x = x - 1; //initlal text box count    
          if ($('.catalog-items', $wrapper).length &gt; 1) $(this).parent('.catalog-items').remove();
      });
  });
  });
  </code></pre>