Kotti / deform_bootstrap

Bootstrap compatible templates for the deform form library. (Merged into deform 2.)
http://pypi.python.org/pypi/deform_bootstrap
34 stars 30 forks source link

Respect the autocomplete attribute for forms #54

Closed bochecha closed 11 years ago

bochecha commented 11 years ago

deform allows creating a form as follows:

>>> class MySchema(colander.Schema):
...     foo = colander.SchemaNode(colander.String())
...
>>>
>>> form = deform.Form(MySchema(), autocomplete=False)

The generated form should have a autocomplete="off" attribute set as a result, but it was ignored by the form.pt template.

This change is inspired by the code of the form.pt template in deform itself.

bochecha commented 11 years ago

Hello?

This is a trivial change, and the issue it fixes is very annoying, could somebody have a look at it?