Millisecond Forums

Response font style as capitals

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

By Nachtara - 11/20/2018

Hi all,

i would like to make a surveypage with textboxes where people are only able to use upper cases but not have to press the shift button on their computer first. 
It it possible via response font style?

Thanks in advance!

By Dave - 11/20/2018

Nachtara - Tuesday, November 20, 2018
Hi all,

i would like to make a surveypage with textboxes where people are only able to use upper cases but not have to press the shift button on their computer first. 
It it possible via response font style?

Thanks in advance!


No, but what you can do is have people type in whatever way they want, and then use the toupper() function to capitalize the entire response, e.g. if you want to use it as item later in the task. Example:

<block myblock>
/ trials = [1=mypage; 2-4 = mytrial]
</block>

<surveypage mypage>
/ ontrialend = [
item.myitems.setitem(toupper(textbox.q1.response),1);
item.myitems.setitem(toupper(textbox.q2.response),2);
item.myitems.setitem(toupper(textbox.q3.response),3);
]
/ questions = [1=q1; 2=q2; 3=q3]
/ showpagenumbers = false
/ showquestionnumbers = false
</surveypage>

<textbox q1>
/ caption = "Your favorite color?"
</textbox>

<textbox q2>
/ caption = "Your favorite food?"
</textbox>

<textbox q3>
/ caption = "Your favorite animal?"
</textbox>

<trial mytrial>
/ stimulusframes = [1=mytext]
/ validresponse = (57)
</trial>

<text mytext>
/ items = myitems
</text>

<item myitems>
/ 1 = ""
/ 2 = ""
/ 3 = ""
</item>