KimG wrote:
The user adds the extra row on the client using jscript and DOM.
I would like to avoid having to take another round trip to the server for adding an extra row.
Youre not taking another trip. this is the process
1.) User visit page with form - in the controller/action the form is created dynamically, view is render with the form.
2) User adds some fields via javascript and enters other data
3) Form is posted to a controller/action - During this action the form is reconstructed usually using the exact same logic as step 1 so it can be validated and then used (typically persisted in some way).
So what im saying is if the user adds fields in step 2, then you have to account for those fields in step 3. The easiest way is actually to encapuslate all the form construction within a form class, that way you can easily add detetction of the added fields and add them to the subform.