0 votes
in SoSci Survey (English) by s101689 (110 points)
closed by SoSci Survey

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!

closed with the note: No new information has been added to this question.
by SoSci Survey (309k points)
Could you please add this line in line 2...

debug($participant);

... and then post the complete debug information from that page:
https://www.soscisurvey.de/help/doku.php/de:create:debugging

Willkommen im Online-Support von SoSci Survey.

Hier bekommen Sie schnelle und fundierte Antworten von anderen Projektleitern und direkt von SoSci Survey.

→ Eine Frage stellen


Welcome to the SoSci Survey online support.

Simply ask a question to quickly get answers from other professionals, and directly from SoSci Survey.

→ Ask a Question

...