I have a form with fields named like this:
Field1
Field2
Field3
...
...
...
Field10
Rather than writing validation for each field individually I want to write a loop that iterates trough each field based on a counting variable after clicking submit, for example:
- $count = 0
- Do
- {
- count++
- if ("Field" + $count == "value") { Do something }
- } until ($count == 10)