Group: Forum Members
Posts: 5,
Visits: 8
|
I am writing a script where I need to capture a participant's response using a slider, and print it back to them in a subsequent trial, but I'm getting a peculiar issue.
The response is stored in a <values> item using the following command (it's actually first stored in another <values> item first and then transfered to values.selectedurn_bet, but I'm not sure if that's important here): values.selectedurn_bet = format("%.2f", surveypage.known_urn_page.response/100)
and then printed to the screen using a <text> element:<text selectedbet_text> / items = ("For this urn, you bet $<%format(~"%.2f~", values.selectedurn_bet)%>") / size = (40%, 10%) / position = (50%, 72%) / hjustify = center </text>
Everything works fine if the participant drags the slider to set their bet. However, if they use the default slider value (i.e. respond without actually clicking and dragging the slider to a different value), the number reported by the text element is 0.00: For this urn, you bet $0.00
In case it helps I've attached the code here
Thanks in advance!
|