Millisecond Forums

I want to do conditional branching with multiple survey pages ? also a way to pose questions both horizontally and vertically?

https://forums.millisecond.com/Topic17272.aspx

By ghdtjs - 9/28/2015

Hi, 

I am trying to code an experiment where I can do conditional branching with multiple survey pages. 

So if someone answers "1" to the first question, then he should be guided to survey#1.
This survey #1 contains about 5 survey pages with 4 questions per page (these questions would be radiobutton ones). 

and if someone answers "2" to the first question, then he should be guided to survey#2. 
This survey #2 also contains about 5 survey pages with 4 questions per page (these questions would be radiobutton ones). 

Also,is there a way to pose questions horizontally and vertically? like the following: 


q1. ------------------                   q.6---------------------------
q2. ------------------                   q.7---------------------------
q3. ------------------                   q.8---------------------------
q4. ------------------                   q.9---------------------------
q5. ------------------                   q.10---------------------------


please help me out!
much appreciated in advance!!!!!!
By Dave - 9/28/2015

This is simple. You have three <survey> elements or <block>s.

From the 1st <survey> /branch to either survey a or b based on the response. Survey a and b contain the respective follow-up questions. Example:

<expt>
/ blocks = [1=start]
</expt>

<survey start>
/ pages = [1=startpage]
/ branch = [if (radiobuttons.startquestion.response=="A") survey.afollowup]
/ branch = [if (radiobuttons.startquestion.response=="B") survey.bfollowup]
</survey>

<surveypage startpage>
/ questions = [1=startquestion]
</surveypage>

<radiobuttons startquestion>
/ options = ("A", "B")
</radiobuttons>

<survey afollowup>
/ pages = [1=a1]
</survey>

<surveypage a1>
/ caption = "Your A follow-up questions and pages go here..."
</surveypage>

<survey bfollowup>
/ pages = [1=b1]
</survey>

<surveypage b1>
/ caption = "Your B follow-up questions and pages go here..."
</surveypage>


By Dave - 9/28/2015

Regarding orienting and positioning questions:

#1: See the documentation /orientation attribute to switch a given questions layout between vertical and horizontal:

<radiobuttons startquestion>
/ options = ("A", "B")
/ orientation = vertical
</radiobuttons>
vs,
<radiobuttons startquestion>
/ options = ("A", "B")
/ orientation = horizontal
</radiobuttons>

#2: Use the various questions' /position attributes to distribute them on a given <surveypage> as needed.
By ghdtjs - 9/30/2015

thank you Dave!!!
I will try them out!