Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi!
I find the textfield-only #field_suffix and #field_prefix very helpful and I've already overridden theme_form_element() theme-level to make them available for all fields, and it's working out great.
Attached a patch that removes them from theme_textfield() and add them to the more generic theme_form_element() for core.
Comment | File | Size | Author |
---|---|---|---|
#15 | drupal.field-prefix-suffix.15.patch | 1.66 KB | sun |
#13 | field_prefix_suffix_for_all4.patch | 1.8 KB | dawehner |
#7 | field_prefix_suffix_for_all4.patch | 2.05 KB | dawehner |
#5 | field_prefix_suffix_for_all3.patch | 1.75 KB | dawehner |
#3 | field_prefix_suffix_for_all2.patch | 1.46 KB | AmrMostafa |
Comments
Comment #1
catchNo longer applies.
Comment #2
PanchoMoving feature requests to the D7 queue.
Comment #3
AmrMostafa CreditAttribution: AmrMostafa commentedPatch updated to HEAD.
Comment #5
dawehnerjust a rerole
Comment #7
dawehnerreroll
Comment #8
cburschkaWhich non-textfield elements do we need this for? Select? Seeing as checkbox and radio labels are already printed like a #field_suffix, and it's difficult to imagine a situation where you want something to the left of them...
I suppose it can't hurt to add support for it, though.
I can see no code-style problems with this patch.
Comment #10
webchickComment #11
catchMakes sense to centralise this in theme_element(), and theme_textfield() is a bit of a mess as well (really shouldn't have the autocomplete stuf in there either).
Comment #13
dawehnerhere is the rerole
Comment #15
sunOh my. I thought we would have fixed this totally annoying bug long ago?! Just ran into the same issue in contrib. Again.
Re-rolled from scratch against HEAD.
Comment #16
catchRTBC again.
Comment #17
marcvangend#15: drupal.field-prefix-suffix.15.patch queued for re-testing.
This is a good idea, let's get it in.
Comment #18
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks.
Comment #20
kkaefer CreditAttribution: kkaefer commentedFix for this patch in #755030: Regression: #field_prefix/suffix is displayed before the label