Add form elements to dynamically for multiple item insert.
  • The page initially loads just one set of form fields for the first item
  • If you need to add more than one item, you can add more form fields at the click of a button
  • The fields are loaded via ajax from a separate file - no messing around in the javascript!
  • In this example, the form field names are defined as an array which can then be extracted when posted.
  • See source code or my blog entry for more info.