Trying to prefill multiple-choice question

Mehr
4 Jahre 2 Monate her #119248 von davidmenefee
Hi folks

I want to prefill a multiple-choice question from the URL, but I can't get it working. I've tried the suggestions on these pages:

manual.limesurvey.org/Workarounds:_Surve...using_the_survey_URL
manual.limesurvey.org/Expression_Manager#Qcode_Variable_Naming

I exported a survey result with question and answer codes. The first question in the first group is identified in the exported data like this:

question code: groups[5393]
answer code: Y

I've tried these URLs (I've removed the base URI for clarity):

.../index.php/survey/index/sid/925635/newtest/Y/lang/en?groups[5393]=Y
.../index.php/survey/index/sid/925635/newtest/Y/lang/en?groups[5393]=1
.../index.php/survey/index/sid/925635/newtest/Y/lang/en?groups[5393]="Y"
.../index.php/survey/index/sid/925635/newtest/Y/lang/en?groups[5393]='Y'
.../index.php/survey/index/sid/925635/newtest/Y/lang/en?groups_5393='Y'
.../index.php/survey/index/sid/925635/newtest/Y/lang/en/groups/5393/Y
.../index.php/survey/index/sid/925635/newtest/Y/lang/en/groups[5393]/Y
.../index.php/survey/index/sid/925635/newtest/Y/lang/en/groups?5425=Y

Also tried the SGQA identifier:
.../index.php/survey/index/sid/925635/newtest/Y/lang/en/925635X1X536X5393/1
.../index.php/survey/index/sid/925635/newtest/Y/lang/en?925635X1X536X5393=Y
.../index.php/survey/index/sid/925635/newtest/Y/lang/en?925635X1X536X5393='Y'
.../index.php/survey/index/sid/925635/newtest/Y/lang/en?925635X1X536X5393='1'

This worked for a different, single-choice drop-down list question:

.../index.php/survey/index/sid/925635/newtest/Y/lang/en/School/5393

So I know passing answers via the URL *should* work.

thanks for any help!

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

LimeSurvey Partners
Mehr
4 Jahre 2 Monate her #119252 von holch
I asume that groups[5393] is your questioncode and it is a multiple answer question, how should limesurvey know which of the answers to tick? You have to look at the survey/question logic page to see how each subquestion is referenced. Probably by adding using something like groups[5393]_1 and so on. And i am not sure if you are allowed to use those brakets in a questioncode.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
4 Jahre 2 Monate her #119259 von tpartner
If, for example, the sub-question codes are "SQ001, SQ002...", using the full SGQA (no "X" between the question and sub-question codes) should work:
.../index/sid/925635/newtest/Y/lang/en?925635X1X536SQ001=Y

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
Folgende Benutzer bedankten sich: davidmenefee

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
4 Jahre 1 Monat her #119750 von davidmenefee
I ended up using a different approach that didn't require that I pass an answer to a multiple-choice question. I couldn't get the latter to work, even with your last suggestion, unfortunately. Passing an answer to a single-choice question worked fine. Thanks!

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Jetzt loslegen!

Melden Sie sich jetzt an, und erstellen Sie in wenigen Minuten Ihre erste Umfrage.

Account einrichten

Abonnieren Sie unseren Newsletter

Abonnieren Sie unseren Newsletter für alle Neuigkeiten rund um LimeSurvey
captcha