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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

catch’s picture

Status: Needs review » Needs work

No longer applies.

Pancho’s picture

Version: 6.x-dev » 7.x-dev

Moving feature requests to the D7 queue.

AmrMostafa’s picture

Component: theme system » forms system
Status: Needs work » Needs review
FileSize
1.46 KB

Patch updated to HEAD.

Status: Needs review » Needs work

The last submitted patch failed testing.

dawehner’s picture

Status: Needs work » Needs review
FileSize
1.75 KB

just a rerole

Status: Needs review » Needs work

The last submitted patch failed testing.

dawehner’s picture

Status: Needs work » Needs review
FileSize
2.05 KB

reroll

cburschka’s picture

Which 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.

Status: Needs review » Needs work

The last submitted patch failed testing.

webchick’s picture

Status: Needs work » Needs review
catch’s picture

Status: Needs review » Reviewed & tested by the community

Makes 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).

Status: Reviewed & tested by the community » Needs work

The last submitted patch failed testing.

dawehner’s picture

Status: Needs work » Needs review
FileSize
1.8 KB

here is the rerole

Status: Needs review » Needs work

The last submitted patch failed testing.

sun’s picture

Title: field_suffix & field_prefix for all » #field_prefix and #field_suffix work on textfields only
Assigned: AmrMostafa » Unassigned
Category: feature » bug
Status: Needs work » Needs review
FileSize
1.66 KB

Oh 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.

catch’s picture

Status: Needs review » Reviewed & tested by the community

RTBC again.

marcvangend’s picture

#15: drupal.field-prefix-suffix.15.patch queued for re-testing.

This is a good idea, let's get it in.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

kkaefer’s picture