Active
Project:
ImageField
Version:
6.x-3.9
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
5 Jul 2011 at 06:08 UTC
Updated:
6 Jul 2011 at 16:59 UTC
Normally, on imagefield, the file browser is displayed first, then, the label/description. It goes something like this:
Choose file: [browse]
"Maximum file size: 8 MB
Allowed extensions: png gif jpg jpeg
Images must be exactly 200x250 pixels"
How can i switch their position so that the label/description is displayed first before the file browser?
Can this be achieve by just fiddling with the admin settings? Or modding the stylesheet is the only way?
Thanks.
Comments
Comment #1
quicksketchThere's no setting you can use to change the positioning of the description. Unfortunately in Drupal 6 *all* fields are controlled by a single theme function: theme_form_element(). So if you overrode that theme function, it would apply throughout your entire Drupal site.
Comment #2
avergara commentedjust as i thought. thank you for clearing it up
Comment #3
avergara commentedcan this be achieved thru a form_alter hook?
i am thinking of getting the div id of the label, then, thru php, copy its contents, hide the label div, and then insert the copied content before the upload field.
but i dont know how and where to do this.. if it is possible of course.
thankss
Comment #4
avergara commentedon which folder can i see this theme_form_element() function??
Comment #5
quicksketchIn theory you could move the description above a field by form_altering it into a different element that is placed above the field. That's an option yes.
I'm sure you're capable of using a text editor and a search. Sometimes it's also convenient to just look the function you want up at http://api.drupal.org.