When attempting to set the default value of a SelectField with WTForms, I pass in value to the \'default\' parameter like so.
class TestForm(Form): test_fi
There are a few ways to do this. Your first code snippet is indeed correct.
If you want to do this in a View dynamically though, you can also do:
form = TestForm() form.test_field.default = some_default_id form.process()