From e9202a3f22a431af0d47a9f9112b033a65d7cabe Mon Sep 17 00:00:00 2001 From: Pavol Zibrita Date: Mon, 7 Dec 2015 23:39:50 -0500 Subject: [PATCH 1/2] Update forms.py Wrapped inputs get rendered without name and so the form object does not work correctly. I'm not sure what is the correct fix for this, this looks to me more as a quickfix as probably more node's attributes should be put there. Or, why not just use the node render itself? Even the sample app's example form does not work because of this. --- flask_bootstrap/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flask_bootstrap/forms.py b/flask_bootstrap/forms.py index bd5a77a5..efd3fe81 100644 --- a/flask_bootstrap/forms.py +++ b/flask_bootstrap/forms.py @@ -48,7 +48,7 @@ def _wrapped_input(self, node, classes=['form-control'], **kwargs): wrap = self._get_wrap(node) wrap.add(tags.label(node.label.text, _for=node.id)) - wrap.add(tags.input(type=type, _class=' '.join(classes), **kwargs)) + wrap.add(tags.input(type=type, _class=' '.join(classes), name=node.name, **kwargs)) return wrap From 232afbbac0609ff926520c2d87aed604f4f7241a Mon Sep 17 00:00:00 2001 From: Pavol Zibrita Date: Tue, 8 Dec 2015 01:51:36 -0500 Subject: [PATCH 2/2] Update forms.py --- flask_bootstrap/forms.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flask_bootstrap/forms.py b/flask_bootstrap/forms.py index efd3fe81..d47c1db6 100644 --- a/flask_bootstrap/forms.py +++ b/flask_bootstrap/forms.py @@ -48,7 +48,8 @@ def _wrapped_input(self, node, classes=['form-control'], **kwargs): wrap = self._get_wrap(node) wrap.add(tags.label(node.label.text, _for=node.id)) - wrap.add(tags.input(type=type, _class=' '.join(classes), name=node.name, **kwargs)) + value = node.data if node.data is not None else '' + wrap.add(tags.input(type=type, _class=' '.join(classes), name=node.name, value=value, **kwargs)) return wrap