Millisecond Forums

Multiple response of a survey page

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

By Marcel - 2/3/2014

Hi,

I was wondering if someone could point me in the right direction.

I would like to construct a series of survey pages, what I want is one of the questions to store an integer i and then require a future survey page to be presented and the data recorded i times. 

I'm also wondering how to include survey pages in a block statement?


Thank you

Marcel
By Dave - 2/3/2014

<values>
/ myinteger = 0
/ repeatcount = 0
</values>

<block myblock>
/ trials = [1=getinteger]
</block>

<surveypage getinteger>
/ ontrialend = [values.myinteger = textbox.integerquestion.response]
/ questions = [1=integerquestion]
/ showpagenumbers = false
/ branch = [surveypage.repeat_i_times]
</surveypage>

<textbox integerquestion>
/ caption = "Enter an integer between 1 and 5"
/ range = (1,5)
</textbox>

<surveypage repeat_i_times>
/ ontrialend = [values.repeatcount += 1]
/ caption = "This page will be repeated i times"
/ branch = [if (values.repeatcount < values.myinteger) surveypage.repeat_i_times]
</surveypage>