Hi! I am new to oTree and would like to ask a question about displaying variables.
I am working on a project where I created some numeric variables using IntegerField while I hope that on html they could be displayed in texts rather than values. For example, after some calculation, if the variable takes value 1, then display "A". If the variable takes value 2, then display "B".
I know that I can create another string variable and define a mapping from values to texts. However, since I have many numeric variables in this program following the same display rule, creating string fields for every integer field can make the program very tedious. It would be more convenient if there is a way to set up such a display rule for all these numeric variables, for example, defining something in the "var_for_template" function??
Thank you!!
Nanyin