Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
The tableselect element is awesome! But it doesn't print #title, #description etc.
Comment | File | Size | Author |
---|---|---|---|
elements-theme_form_element.patch | 410 bytes | John Morahan | |
Comments
Comment #1
Dave ReidThe tableselect is a backport implementation of Drupal 7's core element. I'll backport any changes from there only.
Comment #2
Dave ReidComment #3
Dave ReidComment #4
Cyberwolf CreditAttribution: Cyberwolf commentedHi
I think not implementing this is a bad idea. The #title and #description elements are usually important information for the end user, and it's bad for usability if they aren't there.
The fix is very small though, in theme_tableselec(), replace the last line:
with this:
Edit: didn't see the patch, sorry for my useless comment
This probably should be fixed for Drupal 7 as well. I'll check the issue tracker of the Drupal project to see if there are any issues similar to this one.
Comment #5
Cyberwolf CreditAttribution: Cyberwolf commentedIt looks to me like in Drupal 7 form element theming has changed quite a bit, the individual theme functions for field types (for example theme_textfield) are not calling theme('form_element', ...) anymore themselves. I guess this is called automatically afterward. I did not test this on a site, just my conclusion from a quick look at the code. It might be worth investigating this in detail.
Comment #6
Dave ReidD7 doesn't call theme('form_element') on tableselects at all. I just double-checked. Therefore, this change would have to come as a backport from Drupal 7.