mbr / flask-bootstrap

Ready-to-use Twitter-bootstrap for use in Flask.
http://pypi.python.org/pypi/Flask-Bootstrap
Other
1.58k stars 724 forks source link

render_form missing name attr #172

Open FingerLiu opened 6 years ago

FingerLiu commented 6 years ago

html generated by render_form is <input class="form-control" type="text"> which there is no name attr. This lead to fail POST form, because there is no field data detected when server received data. Is this on purpose or bug? If it is a bug, happy to PR .

cjauvin commented 6 years ago

You seem to be absolutely right, and I just lost a few hours banging my head on this, before finding your issue.. For now the only solution I could come up with is to use wtf.quick_form instead of render_form:

https://github.com/mbr/flask-bootstrap/blob/master/sample_app/templates/signup.html#L14

for the moment what I "lose" by doing that is not clear to me at all though. Any idea?