oTree Forum >

formfields causing error on page

#1 by PhilP

Hi everyone,

I have added a form_field to a page following the Forms docs: 

form_model = 'player'
form_fields = ['stock_choice']

But when I run the page it won't let me move on to the next page, stating: "Please fix the errors" although no errors shows up on my PyCharm. Does anyone know why this is happening and how I can fix it?

Thanks,
Phil

#2 by llinfeng

In the page.html file, have you collected the subject's input for stock_choice?

#3 by PhilP

Hi llinfeng, I resolved this error by setting blank=True in the player level when I defined stock_choice, but player's choices still aren't saved in my data so maybe this is why. I am not sure how to collect their inputs so I don't think I did. Can you direct me to how to?

Thanks,
Phil

#4 by PhilP

All good, I have figured it out

Write a reply

Set forum username