Feature request : name/ ID prefix value

5 views
Skip to first unread message

Voltron

unread,
Feb 29, 2012, 7:07:18 PM2/29/12
to Humongolus
Could you consider allowing one to define a prefix attribute for a
form? This prefix is then prepended to all its fields IDs and names.
The reason behind this the fact that multiple forms on a page that
might have the same name or might post to the same resource, i.e
email for the login form and for the contact form. It would have been
taken care of though if this was possible:

email = widget.Input(label="Email", id="my-new-id") or in a tornado
template

{% raw field.render(cls='fm-text', id="my-new-id") %}

Both methods have no effect

Voltron

unread,
Feb 29, 2012, 7:09:21 PM2/29/12
to Humongolus
Whoops! Sorry this works:

{% raw field.render(cls='fm-text', id="login") %}

But it would still be nice if we could have prefixes

Christopher S Coté

unread,
Feb 29, 2012, 7:18:17 PM2/29/12
to humon...@googlegroups.com
form wide pre-pends coming right up ;)

Voltron

unread,
Feb 29, 2012, 7:19:38 PM2/29/12
to Humongolus
Hehe, awesome. Thanks!

Christopher Coté

unread,
Feb 29, 2012, 10:39:02 PM2/29/12
to humon...@googlegroups.com
just made a commit for pre-pends

you should be able to set _prepend in the class definition or pass in prepend on instantiation.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages