views:

110

answers:

1

Hi, I have a page that has fields dynamically loaded via JQuery. It allows a user to add additional fields and data on the fly. Currently that data is collected via JQuery and sent via an Ajax request to be dealt with.

But is there anyway of doing this in a normal action post? Currently it seems that the dynamically inserted fields are not being included in the post. I tried using FormCollection as a parameter to my Action, but that didnt seem to work.

+1  A: 

Have you created these fields correctly, remember you must include a name attribute and ensure they are inside the form you are posting. Maybe if you could paste your jquery script we could assist more.

redsquare
I have a table with 5 fields in, so Im basically just cloning the last row.$('#tblAdditionals tr.EntryRow:last').clone(true).attr("id", "sectionRow" + rowNumber).insertAfter('#tblAdditionals tr.EntryRow:last');And yes, it is inside a form. However the FormCollection only contains the keys for the first row of fields.
really could do with the full markup/script to get a handle on it. Does firebug show you the new row inserted correctly with all the controls having unique id's and appropriate name attributes on the inputs
redsquare
Got it. The name wasnt unique. Thanks