diff --git a/ngforms.py b/ngforms.py index 7c69134..325316a 100644 --- a/ngforms.py +++ b/ngforms.py @@ -165,7 +165,7 @@ def build(self, form): attrs = { "type": self.type, "id": self.id, - "name": self.name, + "name": self.id, "placeholder": self.placeholder, "class": ' '.join(self.cls), "ng-model": 'data.%s' % self.id, @@ -191,7 +191,7 @@ def __init__(self, id, cls, name, rows, placeholder=''): def build(self, form): attrs = { "id": self.id, - "name": self.name, + "name": self.id, "placeholder": self.placeholder, "class": ' '.join(self.cls), "ng-model": 'data.%s' % self.id, @@ -202,7 +202,7 @@ def build(self, form): attrs.update(at) input = [' %s="%s"' % (k, v) for k,v in attrs.iteritems()] - input = '' % ''.join(input) + input = '' % ''.join(input) return tmpl % input