Registration limit problem
I'm trying to create a script where I can limit the number of registrants for each session (dropdown menu selection). I'm trying to copy and paste a script from another discussion (modified for my fields), but it's not working. Please help.
The script error within add - validate is: Encountered "18" at line 1, column 41.
Was expecting one of:
"]" ...
"*" ...
- cnt1 = count ( Meeting_Time [ October 18, 6-7 p.m. == input.October 18, 6-7 p.m. ] );
- cnt2 = count ( Meeting_Time [ October 18, 7-8 p.m. == input.October 18, 7-8 p.m. ] );
- cnt3 = count ( Meeting_Time [ October 21, 6-7 p.m. == input.October 21, 6-7 p.m. ] );
- cnt4 = count ( Meeting_Time [ October 18, 7-8 p.m. == input.October 18, 7-8 p.m. ] );
- if (cnt1 > 18){alert "October 18, 6-7 p.m. limit is full";cancel submit;}
- if (cnt2 > 18){alert "October 18, 7-8 p.m. limit is full";cancel submit;}
- if (cnt2 > 18){alert "October 21, 6-7 p.m. limit is full";cancel submit;}
- if (cnt2 > 18){alert "October 18, 7-8 p.m. limit is full";cancel submit;}