Taxonomy Selection and the new 4.7 Forms API
All, I posted a forum topic on this the other day but I thought I'd try this route too. I'm in the process of upgrading several modules to the new 4.7 forms API. I noticed this http://drupal.org/node/36899 which basically states you don't need to write code to invoke a taxonomy selection box any more, it is automatic. This seems to work out fine except I haven't found any way to control the placement of the taxonomy section on the form. Since you don't invoke it yourself it doesn't seem to respond to my efforts to control where it is placed. Is this an oversight or is there some hidden tip I'm not aware of? Any help would be greatly appreciated. Regards, Raven Brooks
Raven Brooks wrote:
All,
I posted a forum topic on this the other day but I thought I'd try this route too. I'm in the process of upgrading several modules to the new 4.7 forms API. I noticed this http://drupal.org/node/36899 which basically states you don't need to write code to invoke a taxonomy selection box any more, it is automatic.
This seems to work out fine except I haven't found any way to control the placement of the taxonomy section on the form. Since you don't invoke it yourself it doesn't seem to respond to my efforts to control where it is placed.
Is this an oversight or is there some hidden tip I'm not aware of? Any help would be greatly appreciated.
You can control where on the form this is placed by creating a function theme_YOURFORMID($formid, $form_values) and placing your items as you like them. It's a bit of a pain but there are some advantages to the method (mostly being you get a lot more control.
Hi, On Thu, 2005-12-29 at 19:00 -0800, Raven Brooks wrote:
All,
I posted a forum topic on this the other day but I thought I'd try this route too. I'm in the process of upgrading several modules to the new 4.7 forms API. I noticed this http://drupal.org/node/36899 which basically states you don't need to write code to invoke a taxonomy selection box any more, it is automatic.
This seems to work out fine except I haven't found any way to control the placement of the taxonomy section on the form. Since you don't invoke it yourself it doesn't seem to respond to my efforts to control where it is placed.
Is this an oversight or is there some hidden tip I'm not aware of? Any help would be greatly appreciated.
You can either use a theme, or even easier use the hook_form_alter() to change the weight of the form items. Gordon.
participants (3)
-
Earl Miles -
Gordon Heydon -
Raven Brooks