Questions tagged [otree]

oTree is a Python framework for multiplayer decision games, behavioral experiments, and surveys

oTree is a Python framework for multiplayer decision games, behavioral experiments, and surveys.

104 questions
1
vote
1 answer

evenly spaced, horizontal radio buttons with labels underneath

For a user form I need several likert items. (Questions to assess the degree of an opinion. Example at the bottom) I'm required to use the oTree library, which heavily builds on django. A solution that deviates from oTree as little as possible is…
ColdBrew
  • 95
  • 1
  • 7
1
vote
0 answers

otree - change button value on click

I have form field made of bootstrap buttons with this choices: def players_choice_choices(self): choices = [('A', 1),('B', 2),('Check', 3)] return choices I would like to present the 'A','B','Check' choices and after the user will click on…
pnina
  • 149
  • 6
1
vote
1 answer

Non-submit button in oTree

I have a form made of buttons and a submit button. I want to submit only from the submit button. I tried to use button type="button", but when I try to submit I get a "This field is required" error. How can I accomplish this?
pnina
  • 149
  • 6
1
vote
2 answers

oTree - form widget made of buttons

I would like to make a form in oTree that consist of buttons, the user will choose his answer by clicking one of the buttons. The build-in widget aren't good enough. Is there a way to build this? Thank you!
pnina
  • 149
  • 6
1
vote
1 answer

Pick an array of numbers at random in oTree

I'm trying to generate a random array of numbers. There are x rounds in my experiment. I want that a different picture is displayed in each round and that the pictures appear in a random order. I'm trying to embed some python code in models.py in…
TEC
  • 53
  • 7
1
vote
2 answers

How to label an oTree Slider widget using a jQuery selector?

I am trying to label a slider as in jQuery UI Slider Labels Under Slider. I am not dealing with a ui-slider however, but rather with the slider widget from oTree. The excellent answer to the question Mandatory slider in oTree/django explains how to…
user449277
  • 35
  • 5
1
vote
0 answers

app doesn't work with otree 1.4.4

I have an otree app that works perfectly on my computer, with otree 1.3.1. In this app, I specify several settings variables. One of those is called "sure", which can take values 0 or 1, and I refer to it in models.py and views.py as…
arsik87
  • 11
  • 4
1
vote
2 answers

Efficient ways of randomizing treatments in oTree

I am writing the code for the experiment I am going to run in my master thesis. I am basically done, but I am stuck with one last aspect I cannot find the way to solve. I have a public good game with 16 participants, divided in 8 two-players groups.…
DenisDiderot
  • 57
  • 1
  • 9
1
vote
1 answer

in_round() function in oTree

Consider a game with 3 rounds. In every round the player makes a choice (stored in the variable choice). Now, in the 3rd round I want to call someFunction and thereby access the choice made in the 2nd round. Unfortunately someFunction returns None.…
Ben L
  • 97
  • 1
  • 6
1
vote
2 answers

counter for number of NEW buttons clicked (HTML/Javascript)

I am new to programming and I am working with a table on otree were 256 different buttons are displayed using Javascript. Each button unveils an icon which is recalled by a simple function. In this function, I have installed a simple click counter…
1
vote
3 answers

Mandatory slider in oTree/django

I want to use oTree as an alternative for conducting experiments. For this purpose I am looking for a possibility to include mandatory slider questions in forms, i. e. sliders you are required to move before you are able to proceed to the next…
JKR
  • 113
  • 5
1
vote
2 answers

Error in runserver with Django on windows 10

I am using python 3.5 and windows 10, but had the same issue using windows 8, and that is the traceback i get while trying to runserver: Traceback (most recent call last): File "C:\Users\noabendor87\documents\otree\manage.py", line 10, in …
Idan
  • 11
  • 1
0
votes
1 answer

Setting up room in oTree

I have a quick question about Rooms in oTree. I have only one room in settings.py. Do I need to create separate rooms for separate treatments? Because when I deploy the experiment in oTree hub, it takes me to the treatments and after I choose the…
AB_123
  • 1
  • 1
0
votes
0 answers

Extra columns in oTree data from previous treatment

In my experiment, I have three treatments. When I run the last treatment, I get columns on the previous two treatments, although these columns are blank. This is not the case when I run the other two treatments. I am unable to detect anything in the…
0
votes
0 answers

Rooms in seeting.py in oTree

I have a quick question about setting rooms in oTree. This can be perhaps silly but I am a bit confused. I have set up one room for my experiment in oTree hub and hence one room in settings.py file. If I add only one room, then should it be ROOM…