# Answering questions on fourth page of survey jumps the user back to first page

**URL:** <https://discourse.psychopy.org/t/answering-questions-on-fourth-page-of-survey-jumps-the-user-back-to-first-page/37935>\
**Category:** Pavlovia Surveys\
**Created:** [December 15, 2023, 5:49pm UTC](https://discourse.psychopy.org/t/answering-questions-on-fourth-page-of-survey-jumps-the-user-back-to-first-page/37935 "2023-12-15T17:49:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![CharlotteL](https://avatars.discourse-cdn.com/v4/letter/c/f6c823/32.png) [@CharlotteL](https://discourse.psychopy.org/u/CharlotteL)\
**Post date:** [December 15, 2023, 5:49pm UTC](https://discourse.psychopy.org/t/answering-questions-on-fourth-page-of-survey-jumps-the-user-back-to-first-page/37935/1 "2023-12-15T17:49:38Z")

</div>

In my survey, the first page is an HTML file, the second page is consent and third demographics questions, the fourth page has true or false yes/no Boolean questions, however when participants click on any of the questions and sometimes on empty space, the survey jumps them back to the first page. Their answers up to that point are saved for them, however they are also not showing to me as incomplete responses. How can I stop the study from jumping back to the first page please?

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [December 15, 2023, 8:19pm UTC](https://discourse.psychopy.org/t/answering-questions-on-fourth-page-of-survey-jumps-the-user-back-to-first-page/37935/2 "2023-12-15T20:19:21Z")

</div>

Do you have any randomisation in your survey? I’ve come across a bug related to this which needs fixing.

> [@Re-evaluating expressions on every button press? (block random assignment question)](https://discourse.psychopy.org/t/re-evaluating-expressions-on-every-button-press-block-random-assignment-question/37726):
>
> Hi folks, I am using Wake’s [Post](https://discourse.psychopy.org/t/what-ar-the-allowed-functions-in-expression-questions-in-survey/32886/2) as a workaround to displaying 1 of 4 possible pages in a randomised way to participants. I have created 2 variables in the main survey logic tab under Calculated Values: randNum, which is set to random()\*4+1 (so random number between 1 and 5) condition, which is set to iif({randNum} \> 4, "cond1", iif({randNum} \> 3, "cond2", iif({randNum} \> 2, "cond3", "cond4"))) I have a welcome page that I want everyone to see and then 4 pages with questions on them. I want…

---

<div class="post-metadata">

**Author:** ![CharlotteL](https://avatars.discourse-cdn.com/v4/letter/c/f6c823/32.png) [@CharlotteL](https://discourse.psychopy.org/u/CharlotteL)\
**Post date:** [December 16, 2023, 4:22am UTC](https://discourse.psychopy.org/t/answering-questions-on-fourth-page-of-survey-jumps-the-user-back-to-first-page/37935/3 "2023-12-16T04:22:16Z")

</div>

Hi yeah it uses randomisation, is there any way I can get around this or do I just need to wait for the bug to be fixed? Thanks!!

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [December 16, 2023, 8:06am UTC](https://discourse.psychopy.org/t/answering-questions-on-fourth-page-of-survey-jumps-the-user-back-to-first-page/37935/4 "2023-12-16T08:06:55Z")

</div>

What does your randomisation look like?

I’ve been embedding surveys into PsychoPy experiments. Currently you can’t send information to the survey from the experiment, but you can use loops to select which surveys to display and get information back out.

Have a look at survey test in my online demos.

---

<div class="post-metadata">

**Author:** ![CharlotteL](https://avatars.discourse-cdn.com/v4/letter/c/f6c823/32.png) [@CharlotteL](https://discourse.psychopy.org/u/CharlotteL)\
**Post date:** [December 16, 2023, 12:13pm UTC](https://discourse.psychopy.org/t/answering-questions-on-fourth-page-of-survey-jumps-the-user-back-to-first-page/37935/5 "2023-12-16T12:13:15Z")

</div>

So i have three conditions, i did the random number generating thing random()\*3+1 and then iif({RandNumber}\<2, “OCDcond”, iif({RandNumber}\<3, “Acond”, “Ccond”))

I’ll have a look at your demo and see if its something I can do, its a university dissertation so I think there’s some things I can’t do if they stray too far from my original plan due to the ethical approval. Thank you!

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [February 8, 2024, 5:55pm UTC](https://discourse.psychopy.org/t/answering-questions-on-fourth-page-of-survey-jumps-the-user-back-to-first-page/37935/6 "2024-02-08T17:55:40Z")

</div>

I’ve just written a workaround for this

> [@Pavlovia survey issue with group allocation using a random number](https://discourse.psychopy.org/t/pavlovia-survey-issue-with-group-allocation-using-a-random-number/38188/5):
>
> Hi Andrew, Honestly I’m not sure whether it will be fixed by next week. However, I’ve just written a workaround [https://run.pavlovia.org/Wake/survey-group](https://run.pavlovia.org/Wake/survey-group) To launch a survey create a URL of the form [https://run.pavlovia.org/Wake/survey-group?surveyID=733492ba-8997-416b-9c8c-4fe08c3519bc&groups=3](https://run.pavlovia.org/Wake/survey-group?surveyID=733492ba-8997-416b-9c8c-4fe08c3519bc&groups=3) This will launch survey 733492ba-8997-416b-9c8c-4fe08c3519bc and randomly allocate a value for group between 1 and 3. Please test.
