I can get most of the functionality I want under oTree "Lite" (v5.2.8) with this simple approach:
class Player(BasePlayer):
example1 = models.BooleanField(label='1')
example2 = models.BooleanField(label='2')
example3 = models.BooleanField(label='3')
example4 = models.BooleanField(label='4')
example5 = models.BooleanField(label='5')
However, while that above works, if the user misses a field, there is an error. The devserver debug information suggests fixing by adding:
{% formfield_errors "example1" %}
{% formfield_errors "example2" %}
...
{% formfield_errors "example5" %}
Another aside, the hint could use the now recommended {{ formfield "example1" }} style over the older {% ... %} style.
Can we nest templates to put that inside the for loop? That would put the error next to the field which would be ideal. I found this does not work:
{% formfield_errors {{ field }} %}
Or, does oTree Lite need an all fields version of formfield_errors (like formfields_errors) to match formfield and formfields (plural)? Or could these default to all fields if no qualifier is given?
Thanks,
Peter