Millisecond Forums

Record slider defaultresponse when questions appear within the same trial

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

By peter.k.p - 2/17/2021

Hi Everyone,

Please, see the below code. I am randomly choosing a different default response from my list for two sliders. How do I record this default response now? I thought about using /ontrialbegin on the surveyelement level. However, I belief it does not work, because the sliders appear within the same trial (and only vary per question). Any thoughts?

Thanks,
P

<data>
/ columns = (list.slider_start_position.currentvalue)
</data>

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

<block first>
/ trials = [1=thought_probe_1]
</block>

<surveypage thought_probe_1>
/ ontrialbegin = [
]
/ caption ="Answer the questions below based on the thoughts you just had before this screen appeared."
/ questions = [1 = Task, Future]
/ stimulusframes = [1=clearscreen]
/ screencapture = false
/ fontstyle = ("Arial", 3%, false, true, false, false, 5, 1)
/ subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1)
/ itemfontstyle = ("Arial", 3%, true, false, false, false, 5, 1)
/ responsefontstyle = ("Arial", 2.5%, false, false, false, false, 5, 1)
/ txcolor = black
/ showpagenumbers = false
/ showquestionnumbers = false
/ navigationbuttonfontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ navigationbuttonsize = (15%, 5%)
/ nextbuttonposition = (45%, 90%)
</surveypage>

<list slider_start_position>
/ items = (0,1,2,3,4,5,6,7,8,9,10,
  11,12,13,14,15,16,17,18,19,20,
  21,22,23,24,25,26,27,28,29,30,
  31,32,33,34,35,36,37,38,39,40,
  41,42,43,44,45,46,47,48,49,50,
  51,52,53,54,55,56,57,58,59,60,
  61,62,63,64,65,66,67,68,69,70,
  71,72,73,74,75,76,77,78,79,80,
  81,82,83,84,85,86,87,88,89,90,
  91,92,93,94,95,96,97,98,99,100)
/ selectionmode = random
/ selectionrate = always
</list>

<slider Task>
/caption = "My thoughts were focused on the task
I was performing:"
/ defaultresponse = list.slider_start_position.nextvalue
/ labels=("Not at all", "Completely")
/ range = (0, 100)
/ increment = 1
/ showticks = false
/ position = (35%, 20%)
/ required = true
</slider>

<slider Future>
/caption = "My thoughts involved future events:"
/ defaultresponse = list.slider_start_position.nextvalue
/ labels=("Not at all", "Completely")
/ range = (0, 100)
/ increment = 1
/ showticks = false
/ position = (35%, 40%)
/ required = true
</slider>
By Dave - 2/17/2021

peter.k.p - 2/17/2021
Hi Everyone,

Please, see the below code. I am randomly choosing a different default response from my list for two sliders. How do I record this default response now? I thought about using /ontrialbegin on the surveyelement level. However, I belief it does not work, because the sliders appear within the same trial (and only vary per question). Any thoughts?

Thanks,
P

<data>
/ columns = (list.slider_start_position.currentvalue)
</data>

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

<block first>
/ trials = [1=thought_probe_1]
</block>

<surveypage thought_probe_1>
/ ontrialbegin = [
]
/ caption ="Answer the questions below based on the thoughts you just had before this screen appeared."
/ questions = [1 = Task, Future]
/ stimulusframes = [1=clearscreen]
/ screencapture = false
/ fontstyle = ("Arial", 3%, false, true, false, false, 5, 1)
/ subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1)
/ itemfontstyle = ("Arial", 3%, true, false, false, false, 5, 1)
/ responsefontstyle = ("Arial", 2.5%, false, false, false, false, 5, 1)
/ txcolor = black
/ showpagenumbers = false
/ showquestionnumbers = false
/ navigationbuttonfontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ navigationbuttonsize = (15%, 5%)
/ nextbuttonposition = (45%, 90%)
</surveypage>

<list slider_start_position>
/ items = (0,1,2,3,4,5,6,7,8,9,10,
  11,12,13,14,15,16,17,18,19,20,
  21,22,23,24,25,26,27,28,29,30,
  31,32,33,34,35,36,37,38,39,40,
  41,42,43,44,45,46,47,48,49,50,
  51,52,53,54,55,56,57,58,59,60,
  61,62,63,64,65,66,67,68,69,70,
  71,72,73,74,75,76,77,78,79,80,
  81,82,83,84,85,86,87,88,89,90,
  91,92,93,94,95,96,97,98,99,100)
/ selectionmode = random
/ selectionrate = always
</list>

<slider Task>
/caption = "My thoughts were focused on the task
I was performing:"
/ defaultresponse = list.slider_start_position.nextvalue
/ labels=("Not at all", "Completely")
/ range = (0, 100)
/ increment = 1
/ showticks = false
/ position = (35%, 20%)
/ required = true
</slider>

<slider Future>
/caption = "My thoughts involved future events:"
/ defaultresponse = list.slider_start_position.nextvalue
/ labels=("Not at all", "Completely")
/ range = (0, 100)
/ increment = 1
/ showticks = false
/ position = (35%, 40%)
/ required = true
</slider>

<data>
/ columns = (values.task_default, values.future_default)
</data>

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

<block first>
/ trials = [1=thought_probe_1]
</block>

<values>
/ task_default = 0
/ future_default = 0
</values>


<surveypage thought_probe_1>
/ ontrialbegin = [
    values.task_default = list.slider_start_position.nextvalue;
    values.future_default = list.slider_start_position.nextvalue;
]
/ caption ="Answer the questions below based on the thoughts you just had before this screen appeared."
/ questions = [1 = Task, Future]
/ stimulusframes = [1=clearscreen]
/ screencapture = false
/ fontstyle = ("Arial", 3%, false, true, false, false, 5, 1)
/ subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1)
/ itemfontstyle = ("Arial", 3%, true, false, false, false, 5, 1)
/ responsefontstyle = ("Arial", 2.5%, false, false, false, false, 5, 1)
/ txcolor = black
/ showpagenumbers = false
/ showquestionnumbers = false
/ navigationbuttonfontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ navigationbuttonsize = (15%, 5%)
/ nextbuttonposition = (45%, 90%)
</surveypage>

<list slider_start_position>
/ items = (0,1,2,3,4,5,6,7,8,9,10,
11,12,13,14,15,16,17,18,19,20,
21,22,23,24,25,26,27,28,29,30,
31,32,33,34,35,36,37,38,39,40,
41,42,43,44,45,46,47,48,49,50,
51,52,53,54,55,56,57,58,59,60,
61,62,63,64,65,66,67,68,69,70,
71,72,73,74,75,76,77,78,79,80,
81,82,83,84,85,86,87,88,89,90,
91,92,93,94,95,96,97,98,99,100)
/ selectionmode = random
/ selectionrate = always
</list>

<slider Task>
/caption = "My thoughts were focused on the task
I was performing:"
/ defaultresponse = values.task_default
/ labels=("Not at all", "Completely")
/ range = (0, 100)
/ increment = 1
/ showticks = false
/ position = (35%, 20%)
/ required = true
</slider>

<slider Future>
/caption = "My thoughts involved future events:"
/ defaultresponse = values.future_default
/ labels=("Not at all", "Completely")
/ range = (0, 100)
/ increment = 1
/ showticks = false
/ position = (35%, 40%)
/ required = true
</slider>