Looping through form fields with different names
So I have a form with a bunch of Text fields. Some of the fields are
related and I need to loop through them and add up the numbers in the
value field.
The fields are all named differently so I can tell them apart so I'm not
sure how to look through them.
Can I set them all to the same ID or same something to then do the loop
based on the shared property? I'd rather not have to manually go through
them all but can do that if I have to.
I guess maybe if all the fields are part of a form array I can figure out
where the fields I want start and stop and loop them that way? hmmm
No comments:
Post a Comment