Survey Dynamic Url issue

Hi,

I was trying to use the dynamic URL in my survey. The logic works fine in preview, but when I try it in pilot mode, it never redirects to the correct URL.

My expression is: {question1} contains 'canada', but it won’t redirect to the correct URL. I’m working with a checkbox question.

It seems to be an issue on Pavlovia’s side.

Did you get a reply?

I have a similar issue. My redirect works, but the participant gets a pop-up of ‘leave’ or ‘cancel’, and they get redirected to different sites depending on what they click (which isn’t what we want, we want the same redirect regardless of the pop-up).

I’m running a pavlovia survey from the online tool (not built in PsychoPy → pavlovia, just straight into pavlovia surveys).

I’m running 2024.1 (to get the logic to work).

I’m trying to use dynamic URLs so that people who a) give consent and complete the whole survey then go to surveymonkey. b) people who do not give consent get directed straight away to google, and do not have the option to go to surveymonkey. Using dynamic URLs sort of works - those who give consent and complete the survey go to surveymonkey. For those who don’t give consent, a pop-up appears that says ‘changes that you’ve made may not be saved’.. ‘leave’ or ‘cancel’. If you click ‘leave’ you’re sent to google. But if you click ‘cancel’ you are sent to surveymonkey. I want people to always get sent to google in this case, and not surveymonkey. Do you have any ideas?

I’ve made this the subject of today’s tip.

This is incredibly useful, thank you, and not something I could’ve solved with googling!

Hi there- I’m having a similar error on a survey. Error 403 saying data cannot be saved and suggests reattempting survey. However data has been saved. I remember seeing a different thread in which you advised to delete this from their expt “// Save data to Pavlovia
psychoJS.experiment.save({saveFormat: ‘csv’});” but I do not see an obvious corresponding segment of code in my survey JSON. Here is a final snippet of my code "{
“name”: “Finished”,
“elements”: [
{
“type”: “html”,
“name”: “AllDone”,
“title”: "Thank you for taking the survey! We’ll be checking back in with shorter questionnaires as the program progresses. You can close this tab. ",
“html”: "Responses logged. Thank you for taking the time to share your current snapshot."
}
]
}
],
“triggers”: [
{
“type”: “runexpression”
}
],
“calculatedValues”: [
{
“name”: “var1”
}
],
“showPrevButton”: false,
“showCompletedPage”: false,
“firstPageIsStarted”: true,
“showTimer”: true,
“widthMode”: “responsive”,
“width”: “100%”
}"

I moved your post here from Online experiments because it relates to Pavlovia Surveys.

Your JSON seems to suggest you have something in the Dynamic URL field, but it isn’t a URL. Please could you confirm?

Looking at the designer, I’m not sure. There is a segment of the JSON code that doesn’t seem to be presented on this version of the survey (which is fine- it doesn’t need to exist):

"“title”: "Thank you for taking the survey! We’ll be checking back in with shorter questionnaires as the program progresses. You can close this tab. "

Is that what you’re referring to?