For the life of me, I can\'t figure out how to pre-populate a BooleanField with WTForms. I have a field called \"active\". It defaults to being not checked, and it\'s not requ
I had the same problem, and after hours of searching and reading, the solution was very simple.
form = forms.TestForm(request.form)
form.yourbooleanfield.checked = YourVariable
if request.method=="POST" and form.validate():
print(form.yourbooleanfield.data)