oTree Forum >

formfield choices and intial value

#1 by frafed

Hi Chris,

I have a problem with the way the values of some formfields are shown on the HTML page. I am using otree studio. 

I have three integer variables whose values range from 0 to 10; I set an initial value (700) which serves me only for design purposes, so I don't want to display it to players. 

When I add this initial value, some variables are correctly displayed (players see "----" as the menu initial value), whereas the initial value is set to 0 in the other formfields (which I don't want). Do you know why I get this inconsistency and how can I fix this?

Thank you!

#2 by Chris_oTree

Please show a screenshot from oTree Studio

#3 by frafed

The three variables ("punishment") are defined in the same way but are displayed differently in HTML (and I would like to have them all work as the last one ("points"))

#4 by Chris_oTree

If you don’t want it to show an initial value, remove the “initial value” in your field definition.

#5 by frafed

I would like to show as initial value the dahsed line (so no initial value), but i need to have an intial value stored in the variable (700). it is strange that in one field this setting works (i picked 700, which is not among the possible choices, so that the player sees the dashed line as their initial value), but in the other two fields this doesn't work and 0 get selected as initial value (even if the code is the same)

Write a reply

Set forum username