title: Build a form dynamically with Ajax, jQuery
body: <p>I'm building a very small web ERP application with PHP / mySQL / CodeIgniter / jQuery<br>
  The Bill/Invoice is built with  </p>
  
  <pre><code>current date
  client data
  etc
  </code></pre>
  
  <p>Now, I must add products to that new invoice that is being created, without reloading/submitting the page. Each product will have its qtty., description, unit price, subtotal, etc.</p>
  
  <p>I'd like to add each product "row" using Ajax/jQuery. </p>
  
  <ul>
  <li>How should I build the products form dynamically? I mean, allowing users to add a new product row, or remove product rows from invoice, using Ajax?  </li>
  <li>How to sum all the dynamically added "rows" in the form, for getting invoice total?</li>
  <li>And how should I receive and treat all the post data so I can insert the proper invoice record in the invoices table and insert the products records into the products_invoices table?</li>
  </ul>
  
  <p><strong>EDIT: here you can see a working example of what I want to do<br>
  <a href="http://www.bambooinvoice.org/index.php/invoices/newinvoice" rel="nofollow noreferrer">http://www.bambooinvoice.org/index.php/invoices/newinvoice</a></strong></p>
  
  <p><strong>EDIT2: This jQuery plugin seems to be what I was looking for<br>
  <a href="http://code.google.com/p/jquery-dynamic-form/" rel="nofollow noreferrer">http://code.google.com/p/jquery-dynamic-form/</a></strong></p>