Re: [Nevow-commits] Generate ids for form elements and use it to relate labels to form inputs.
![](https://secure.gravatar.com/avatar/15fa47f2847592672210af8a25cd1f34.jpg?s=120&d=mm&r=g)
On Feb 28, 2004, at 7:12 PM, mg CVS wrote:
Modified files: Nevow/nevow/freeform.py 1.22 1.23 Nevow/nevow/test/test_freeform.py 1.10 1.11
Log message: Generate ids for form elements and use it to relate labels to form inputs.
Why doesn't this use context.key (+ a suffix perhaps) instead of a newly generated arbitrary number? James
![](https://secure.gravatar.com/avatar/44e3f98a2f3b7213d5f14b558a849dd2.jpg?s=120&d=mm&r=g)
On Sun, 2004-02-29 at 07:46, James Y Knight wrote:
On Feb 28, 2004, at 7:12 PM, mg CVS wrote:
Modified files: Nevow/nevow/freeform.py 1.22 1.23 Nevow/nevow/test/test_freeform.py 1.10 1.11
Log message: Generate ids for form elements and use it to relate labels to form inputs.
Why doesn't this use context.key (+ a suffix perhaps) instead of a newly generated arbitrary number?
Yeah, of course. (/me makes note to stop coding late at night.) Building the id from the key also gives predictable names for use in JavaScript. Cheers, Matt -- Matt Goodall <matt@pollenation.net>
participants (2)
-
James Y Knight
-
Matt Goodall