0 votes
in SoSci Survey (English) by s155876 (140 points)
edited by SoSci Survey

I have four pages that should go to four different groups. For some reason, one page seems to appear twice and it is never the same.

This is the code I entered, based on the instructions on the website.

if (value('NU08') == 1) {
  question('NU09');
} elseif (value('NU08') == 2) {
  question('NU03');
} elseif (value('NU08') == 3) {
  question('NU06');
} elseif (value('NU08') == 4) {
  question('NU04');
} else {
  }

Also, I am providing the survey in two languages (English and German). Is it possible to embed the language selection within the introduction page, rather than having it be the first window the respondents see?

1 Answer

0 votes
by SoSci Survey (330k points)

Please make sure that...

(1) You did not drag any of the questions on the page, but have only the PHP code on the page (and maybe NU08)

(2) If that does not solve the problem, please post the debug information shown during the first and second time the page is displayed.

by s155876 (140 points)
Sorry, I think I posted the wrong link. This should be correct one: https://www.soscisurvey.de/Innovationadoption/?act=3iz2fv6PUCsgkNAs0dBusVWp
I think you will need to open the pretest link a few times until the correct "group" (question NU06) appears and you can see the error message.
by SoSci Survey (330k points)
Okay, thanks, now I see what you mean. What does your current PHP code look like?
by s155876 (140 points)
This is the current code. I think it may be because it says question('FB'), although it's not a question, but a code/text? But I'm not sure.

if (value('NU08') == 1) {
  question('NU09');
} elseif (value('NU08') == 2) {
  question('NU03');
} elseif (value('NU08') == 3) {
  question('NU06');
  question('NU07');
  question('FB');
} elseif (value('NU08') == 4) {
  question('NU04');
} else {
  }
by SoSci Survey (330k points)
> question('FB');

If you have stored FB as a text in a section, than it must have a 4-letter ID. If you stored it in the "text elements" then please use text() instead of question():

text('FB');
by s155876 (140 points)
That did the trick! Thank you so much for your help, you're a hero! :)

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

...