Right now, if you enable the alt, description, and title fields for the image field widget, the title is last. It would be nice to put it first, to be consistent with the node add form, where the title comes first. Many of our users end-up writing the short title in the description box, and the description in the title box, leading to some odd results.

At the very least, it would be nice to be able to have a hook for tweaking the widget layout / field weights *before* the theme_imagefield_widget() function gets called, since by then it's too late to fix-up the weights (it's after process and render).

Comments

quicksketch’s picture

No hook is necessary since you can already modify FileField/ImageFields by using hook_elements(). This is actually the way that modules like FileField Sources or ImageField Extended extend the field. Note that you can also override theme_filefield_widget_item, which isn't too late to adjust the weight of any additional fields that have been added.

guypaddock’s picture

It looks like theme_filefield_widget_item is a bit too late for adjusting weights, but I can manually re-arrange the array. Both #processed and #sorted are 1 by that stage, so the weights have no effect.

quicksketch’s picture

Category: feature » support
Status: Active » Closed (fixed)