0 votes
in SoSci Survey (English) by s104186 (150 points)

I have tried to use the above coding, but an error keeps popping up.

I think there is still a misunderstanding of what I am looking for. I would like the end presentation of my survey as shown

So every respondents get a random "yes" "no" and then input their price choice in the radio button based on the 'determinants'. The yes and no would be random and so would the price options. This random page would be displayed 5 times for the respondent to make the choices 5 times based on the determinants that are different and price options that are different.

Would you still advice me to follow the procedure mentioned above?

related to an answer for: questionnaire within questionnaire

1 Answer

0 votes
by SoSci Survey (327k points)

Your codes should read like this:

111
112
121
122
211
212
221
222

Just as example for 8 combinations of 2 binary factors.

So every respondents get a random "yes" "no" and then input their price choice in the radio button based on the 'determinants'.

If someone has 111, then it would be no, no, no. The code 221 would result in yes, yes, no.

How many such combinations do you have per questionnaire? And how are they combined?

by SoSci Survey (327k points)
So, I hope you used the different placeholders %text1% in the output HTML as well? What does the debug information say: https://www.soscisurvey.de/help/doku.php/en:create:debugging ?
by s104186 (150 points)
This is what it says in the debug information:

The random generator VC01 drew these codes: 11221222
value("VC01") = ""
The following placeholders have been prepared:
%text1% = (text) Yes
%text2% = (text) Yes
%text3% = (text) Yes
%text4% = (text) Yes
%text5% = (text) Yes
%text6% = (text) Yes
%text7% = (text) Yes
%text8% = (text) Yes
by SoSci Survey (327k points)
Okay, you removed the {0} etc. in your code. This will be essential to re-add.

$var = value('VC01', 'label');
$factor1 = $var{0};
$factor2 = $var{1};
// etc...
by s104186 (150 points)
when I re-add {0}, it shows the error as "Uninitialized string offset"

and the debug information as:
The random generator VC01 drew these codes: 21122122
value("VC01") = ""
The following placeholders have been prepared:
%text1% = (text) Yes
%text2% = (text) Yes
%text3% = (text) Yes
%text4% = (text) Yes
%text5% = (text) Yes
%text6% = (text) Yes
%text7% = (text) Yes
%text8% = (text) Yes
by SoSci Survey (327k points)
Okay, this here is wrong:

value("VC01") = ""

Are you sure, you have places the question VC01 above the PHP code?

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

...