Hi there!
I'm trying to set up a quota for my survey but encountering a weird thing. So basically I'm trying to limiting the number of people opting for an option, so I made this PHP code:
$participant = statistic('count', 'A101', 1);
if (value('A101') == 2 or ($participant > 12)) {
pageStop();
goToPage('end');
}
So the idea is that if there are more than 12 people opted for the option, the rests would be redirected to the end page. However, the codes don't work, so instead of putting the interview to an end, it continues to the next section (which I don't want if the participant number reached its limit).
What should I do? What did I do wrong?
Thank you so much!