I need to create a form with multiple rows of radio groups
the choice/values for each row/group is 1,2,3,4,5
I need to make sure only one of each value is selected (i.e. so the visitor can't choose the same value twice in different rows) and that only five rows max can be selected.
I was trying to do it by:
- function on change of radio
- get the values of all and create an array
- see if there are duplicates in the array and alert to inform that different values must be chosen
- count the choices and alert if more than five.
here's the table test code I've been playing around with: