0 votes
in SoSci Survey (English) by s152223 (110 points)
edited by s152223

Hi,

I want in my survey show pages in random order except first page and last one.

When I'm trying to add PHP code at the first page:

$pages = array('2', '3', '4', '5', '6');
shuffle($pages);
$pages[] = '1';
setPageOrder($pages);

it stuck in infinite loop. After last page it starts random again.

Any suggestions?
Thanks!

1 Answer

0 votes
by SoSci Survey (302k points)

Well, what you get is a page order that will end on page 1.

And then, when the respondent clicks on "next" on page 1, page 2 will be displayed, because this is the next page. So you will see all pages 2..6, again.

Try to put the PHP code on page '1' and remove this line:

$pages[] = '1';

And instead add the page to display after (!) page 6, e.g. '7'

$pages[] = '7';

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

...