Closed (won't fix)
Project:
Drupal core
Version:
7.x-dev
Component:
forms system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
12 Mar 2007 at 06:40 UTC
Updated:
17 May 2009 at 16:24 UTC
Right now, there are no IDs on labels for checkboxes. This makes jQuery effects nearly impossible in many cases. Here's a patch that I'm running on site to allow me to add in various jQuery effects.
| Comment | File | Size | Author |
|---|---|---|---|
| t_14.patch | 709 bytes | m3avrck |
Comments
Comment #1
hickory commentedSeems like a good idea. Should labels have 'for' attributes as well?
Comment #2
hickory commentedComment #3
catchstill applies with a few hundred lines offset...
Comment #4
robloachIf we do it for checkboxes, should we do it for all other form elements that use labels as well? Radio buttons, etc?
Comment #5
robin monks commentedSounds like a 7.x feature.
Robin
Comment #6
burningdog commentedD7's code looks like this:
<label for="' . $element['#id'] . '">I don't know enough about jQuery to know if it will work with the 'for', or whether it still needs an element id?
Comment #7
sunThe 'for' attribute is a sufficient jQuery selector.