+xhello,
I'm trying to program my captions and response options to vary depending upon an earlier language selection so that I don't have to create separate items (to make later analysis easier).
For caption of radio buttons (for example) I've used this code at the block level:
/onblockbegin = [
if (values.select == "1") radiobuttons.freq1.caption = "Recycling is important";
if (values.select == "2") radiobuttons.freq1.caption = "La raccolta differenziata è importante"; ]
However the same logic doesn't seem to be working for varying option selection:
if(values.select == "1") radiobuttons.freq1.option.1 = "Never";
if(values.select == "2") radiobuttons.freq1.option.1 = "Mai";
if(values.select == "1") radiobuttons.freq1.option.2 = "Rarely";
if(values.select == "2") radiobuttons.freq1.option.2 = "Raramente";
if(values.select == "1") radiobuttons.freq1.option.3 = "Sometimes";
if(values.select == "2") radiobuttons.freq1.option.3 = "A Volte";
if(values.select == "1") radiobuttons.freq1.option.4 = "Often";
if(values.select == "2") radiobuttons.freq1.option.4 = "Spesso";
if(values.select == "1") radiobuttons.freq1.option.5 = "Very often";
if(values.select == "2") radiobuttons.freq1.option.5 = "Molto Spesso";
if(values.select == "1") radiobuttons.freq1.option.6 = "Not Applicable";
if(values.select == "2") radiobuttons.freq1.option.6 = "Non Applicable";
Do you have any suggestions?
Use values.
<values>
/ select = 2
/ option1 = " "
/ option2 = " "
/ option3 = " "
/ option4 = " "
/ option5 = " "
/ option6 = " "
</values>
<surveypage mypage>
/ ontrialbegin = [
if (values.select == 1) {
values.option1 = "Never";
values.option2 = "Rarely";
values.option3 = "Sometimes";
values.option4 = "Often";
values.option5 = "Very Often";
values.option6 = "Not Applicable";
} else if (values.select == 2){
values.option1 = "Mai";
values.option2 = "Raramente";
values.option3 = "A Volte";
values.option4 = "Spesso";
values.option5 = "Molto Spesso";
values.option6 = "Non Applicable";
}
]
/ questions = [1=freq1]
</surveypage>
<radiobuttons freq1>
/ options = ("<%values.option1%>", "<%values.option2%>", "<%values.option3%>", "<%values.option4%>", "<%values.option5%>", "<%values.option6%>")
</radiobuttons>