When attempting to set the default value of a SelectField with WTForms, I pass in value to the ‘default’ parameter like so.
I’m trying to display a page with a form, then add a
Player to the database when the form is submitted. However, I can’t view the form because the browser always shows a
400 Bad Request error. Other posts indicate that this could be because the name of the form input doesn’t match the key I get from
request.form, but all my keys match. Why do I get this error?