title: Dynamically add form field rows - cakePHP
body: <p>I have a invoice table and an invoice_item table. Each Invoice hasMany invoiceItem. </p>
  
  <p>When creating an invoice the user is presented with a form with the invoice form fields and also a row with invoiceItem form fields. </p>
  
  <p>What I want to do is to have a "add new item" link that dynamically (jQuery, AJAX) adds a new row of the item fields. User should be able to add as many rows as they want and each new row should appear below the last row. </p>
  
  <p>Of course the row field attributes must also be correct so that the data can easily be inserted with the saveAll method. </p>
  
  <p>What is the best and most proper way to accomplish this with CakePHP? I am using CakePHP 2.4.7.</p>