Processing Dynamic Form
I've a JS dynamic form, where i can add or remove fields:
Field 1
Field 2
Field 3
Field 4
Now if I remove Field 2 and add a new field:
Field 1
Field 3
Field 4
Field 5
K, I'm sending this through Ajax POST inside a form element. My problem is
server side PHP processing...how can I know how many fields I have insde
$_POST array and what are their ids? I'm generating unique id using
"field" + counterIndex, but following the example how can I be able to
understand that I have a total of 4 fields and that number 2 is missing?
By the way, inside the form I have static fields too.
No comments:
Post a Comment