Hello,
I am having problems with the slider element, particularly its 'caption' and 'required' properties.
I am creating an experiment where participants are shown a series of pictures with various facial expressions and are asked to evaluate
various aspects of each picture using sliders. Each trial of the experiment (actually a surveypage) displays two pictures (one with the
target expression and one with a neutral expression to compare it to), randomly selecting the target picture from a large set of items,
as well as 12 sliders paired with emotion words (ex. 'happy') stacked on top of each other.
I need to prevent participants from moving forward in the experiment without moving all of the sliders. Normally this would be accomplished
by just setting the slider element's 'required' property to true, but this element works by turning the slider's caption red and I am not
using the slider's caption property but have created separate 'caption' elements for each slider. Instead, the experiment refuses to move
forward, the pictures are for some reason removed from the screen (leaving the sliders and captions in place)(this happens even though I
set the pictures' 'erase' property to false), and the participant does not receive notice that they need to move all of the
sliders before proceeding.
I have worked out two potential solutions to this problem, but both of them have issues:
1. Use the slider's caption element. Unfortunately I cannot do this, because it messes up the positioning of all of the sliders + captions.
There is too much space between the caption and the slider, so the caption for each slider ends up lined with the slider above it, if it
isn't totally obscuring it. For whatever reason, this persists even if I change the amount of space between the slider elements. I have
tried to reduce the space between the slider and its caption by messing around with the slider elements' 'size' and 'slidersize' values,
to no avail. I have tried using 'subcaption' instead of caption, and it pushed the slider + the caption way to the top of the page even
though I didn't change the 'position' values at all (??). Is there any way at all to change the spacing between the slider and its caption,
or should I just give up on this line of thought?
2. Use the /branch property of the surveypage element to make the participant repeat the trial. I am more optimistic about this one but I
am still running into issues. I want to make sure that the participant is still evaluating the same faces, but the experiment is drawing
from a huge pool of images using the noreplace() function and I can't seem to save the specific trial's pictures in a value to be reused.
This is a bit vague but you'll hopefully see what I mean from the code below.
Below I have posted an abridged version of the current code.
Many thanks!
<values>
/current_target = ""
/current_neutral = ""
</values>
<picture neutralface>
/items=neutralfaces
/ position = (15%,55%)
/ size = (26.25%,39.1%)
/ erase = false
</picture>
<picture face>
/ items = faces
/ position = (39%,55%)
/ size = (35%,52.2%)
/ erase = false
</picture>
<item neutralfaces>
/1 = neutralface.jpg
</item>
<item>
/1 = face1.jpg
/2 = face2.jpg
/3 = face3.jpg
/4 = face4.jpg
</item>
<caption question>
/ caption = "For this expression, the person is likely feeling..."
/ position = (30%,10%)
/ fontstyle = ("Arial",20pt)
</caption>
<caption reference>
/ fontstyle = ("Arial",16pt)
/ caption="Reference"
/ position = (11.8%,85%)
</caption>
<caption target>
/ fontstyle = ("Arial",16pt)
/caption="Target"
/ position = (36.6%,85%)
</caption>
<caption neutral_label>
/fontstyle = ("Arial", 12pt)
/caption = "neutral"
/position = (slider.neutral.hposition - 5, slider.neutral.vposition)
</caption>
<slider neutral>
/ fontstyle = ("Arial",11pt)
/ range = (0,100)
/ size = (50%,1%)
/ slidersize=(23.2%, 2%)
/ position = (63.7%,28%)
/ showticks = false
/ showtooltips = false
/ required = false
/ defaultresponse = "0"
</slider>
<caption surprised_label>
/fontstyle = ("Arial", 12pt)
/caption = "surprised"
/position = (slider.surprised.hposition - 5, slider.surprised.vposition)
</caption>
<slider surprised>
/ fontstyle = ("Arial",11pt)
/ range = (0,100)
/ slidersize = (23.5%,2%)
/ position = (63.7%,33.6%)
/ showticks = false
/ showtooltips = false
/ required = false
/ defaultresponse = "0"
</slider>
<caption hopeful_label>
/fontstyle = ("Arial", 12pt)
/caption = "hopeful"
/position = (slider.hopeful.hposition - 5, slider.hopeful.vposition)
</caption>
<slider hopeful>
/ fontstyle = ("Arial",11pt)
/ range = (0,100)
/ slidersize = (23.5%,2%)
/ position = (63.7%,38.1%)
/ showticks = false
/ showtooltips = false
/ required = false
/ defaultresponse = "0"
</slider>
<caption happy_label>
/fontstyle = ("Arial", 12pt)
/caption = "happy"
/position = (slider.happy.hposition - 5, slider.happy.vposition)
</caption>
<slider happy>
/ fontstyle = ("Arial",11pt)
/ range = (0,100)
/ slidersize = (23.5%,2%)
/ position = (63.7%,42.6%)
/ showticks = false
/ showtooltips = false
/ required = false
/ defaultresponse = "0"
</slider>
<caption relieved_label>
/fontstyle = ("Arial", 12pt)
/caption = "relieved"
/position = (slider.relieved.hposition - 5, slider.relieved.vposition)
</caption>
<slider relieved>
/ fontstyle = ("Arial",11pt)
/ range = (0,100)
/ slidersize = (23.5%,2%)
/ position = (63.7%,47%)
/ showticks = false
/ showtooltips = false
/ required = false
/ defaultresponse = "0"
</slider>
<caption disappointed_label>
/fontstyle = ("Arial", 12pt)
/caption = "disappointed"
/position = (slider.disappointed.hposition - 5, slider.disappointed.vposition)
</caption>
<slider disappointed>
/ fontstyle = ("Arial",11pt)
/ range = (0,100)
/ slidersize = (23.5%,2%)
/ position = (63.7%,51.5%)
/ showticks = false
/ showtooltips = false
/ required = false
/ defaultresponse = "0"
</slider>
<caption sad_label>
/fontstyle = ("Arial", 12pt)
/caption = "sad"
/position = (slider.sad.hposition - 5, slider.sad.vposition)
</caption>
<slider sad>
/ fontstyle = ("Arial",11pt)
/ range = (0,100)
/ slidersize = (23.5%,2%)
/ position = (63.7%,56%)
/ showticks = false
/ showtooltips = false
/ required = false
/ defaultresponse = "0"
</slider>
<caption despairing_label>
/fontstyle = ("Arial", 12pt)
/caption = "despairing"
/position = (slider.despairing.hposition - 5, slider.despairing.vposition)
</caption>
<slider despairing>
/ fontstyle = ("Arial",11pt)
/ range = (0,100)
/ slidersize = (23.5%,2%)
/ position = (63.7%,60.5%)
/ showticks = false
/ showtooltips = false
/ required = false
/ defaultresponse = "0"
</slider>
<caption ashamed_label>
/fontstyle = ("Arial", 12pt)
/caption = "ashamed"
/position = (slider.ashamed.hposition - 5, slider.ashamed.vposition)
</caption>
<slider ashamed>
/ fontstyle = ("Arial",11pt)
/ range = (0,100)
/ slidersize = (23.5%,2%)
/ position = (63.7%,64.9%)
/ showticks = false
/ showtooltips = false
/ required = false
/ defaultresponse = "0"
</slider>
<caption disgusted_label>
/fontstyle = ("Arial", 12pt)
/caption = "disgusted"
/position = (slider.disgusted.hposition - 5, slider.disgusted.vposition)
</caption>
<slider disgusted>
/ fontstyle = ("Arial",11pt)
/ range = (0,100)
/ slidersize = (23.5%,2%)
/ position = (63.7%,69.4%)
/ showticks = false
/ showtooltips = false
/ required = false
/ defaultresponse = "0"
</slider>
<caption angry_label>
/fontstyle = ("Arial", 12pt)
/caption = "angry"
/position = (slider.angry.hposition - 5, slider.angry.vposition)
</caption>
<slider angry>
/ fontstyle = ("Arial",11pt)
/ range = (0,100)
/ slidersize = (23.5%,2%)
/ position = (63.7%,74.1%)
/ showticks = false
/ showtooltips = false
/ required = false
/ defaultresponse = "0"
</slider>
<caption fearful_label>
/fontstyle = ("Arial", 12pt)
/caption = "fearful"
/position = (slider.fearful.hposition - 5, slider.fearful.vposition)
</caption>
<slider fearful>
/ caption = "fearful"
/ fontstyle = ("Arial",11pt)
/ range = (0,100)
/ slidersize = (23.5%,2%)
/ position = (63.7%,78.2%)
/ showticks = false
/ showtooltips = false
/ required = false
/ defaultresponse = "0"
</slider>
<text all_qs>
/items = ("Please answer all questions before proceeding")
/ fontstyle = ("Arial", 18pt)
/ txcolor = red
/ position = (slider.neutral.hposition + 5, slider.neutral.vposition - 15)
</text>
<surveypage retry>
/ stimulusframes = [
1=all_qs;
]
/ questions = [
1=question;2=neutral;3=surprised;4=hopeful;5=happy;6=relieved;
7=disappointed;8=sad;9=despairing;10=ashamed;11=disgusted;12=angry;13=fearful;14=target;15=reference; 16=neutral_label;
17=surprised_label; 18=hopeful_label; 19=happy_label; 20=relieved_label; 21=disappointed_label; 22=sad_label; 23=despairing_label;
24=ashamed_label; 25=disgusted_label; 26=angry_label; 27=fearful_label;
]
/ ontrialend = [
if(slider.neutral.response == 0) {
surveypage.retry
}
else{
surveypage.retry.resetstimulusframes();
surveypage.faceq1
}
]
</surveypage>
<surveypage faceq1>
/ ontrialbegin = [
values.current_target = surveypage.faceq1.stimulusframe(1);
values.current_neutral = surveypage.faceq1.stimulusframe(2)
]
/ stimulusframes = [1=noreplace(face); 2=noreplace(neutralface)]
/ questions = [
1=question;2=neutral;3=surprised;4=hopeful;5=happy;6=relieved;
7=disappointed;8=sad;9=despairing;10=ashamed;11=disgusted;12=angry;13=fearful;14=target;15=reference; 16=neutral_label;
17=surprised_label; 18=hopeful_label; 19=happy_label; 20=relieved_label; 21=disappointed_label; 22=sad_label; 23=despairing_label;
24=ashamed_label; 25=disgusted_label; 26=angry_label; 27=fearful_label;
]
/ showpagenumbers = false
/ showquestionnumbers = false
/ branch = [
if(slider.neutral.response == 0 || slider.angry.response == 0 || slider.ashamed.response == 0 || slider.despairing.response == 0 || slider.disappointed.response == 0
|| slider.disgusted.response == 0 || slider.fearful.response == 0 || slider.happy.response == 0 || slider.hopeful.response == 0 || slider.relieved.response == 0
|| slider.sad.response == 0 || slider.surprised.response == 0) surveypage.retry.insertstimulusframe(values.current_target, 2); surveypage.retry.insertstimulusframe(values.current_neutral, 3); surveypage.retry
]
</surveypage>
<block basicsurvey>
/trials = [
1-100=surveypage.faceq1
]
</block>
<expt study1>
/blocks = [
1=basicsurvey
]
</expt>