oTree Forum >

Number Widget

#1 by nathalieroemer

Hi everyone,

from the Otree project on github I understand that there is a number input widget (https://github.com/oTree-org/otree-core/blob/master/otree/forms/widgets.py). When implementing it using widget=widgets.NumberWidget(attrs={'step': '0.1'}), I get the following error: AttributeError: module 'otree.forms.widgets' has no attribute 'NumberWidget'.

Can someone help?
I know, I can alternatively implement it using a html input field, I just wanted to know whether there is a possibility to implement it via oTree formfields directly. 

Thank you!
Nathalie

Write a reply

Set forum username