When called directly with form_builder, forms are loaded skipping the call to form_alter to allow other modules to mess with it.
Replacing
$form = form_builder('taxonomy_manager_form', $form);
with
drupal_prepare_form('taxonomy_manager_form', $form);
moves it up the one level needed to let form_alter work on it, which has worked for me with no ill effects.
Patch attached. Note that the latter function works by reference, which is why "$form = " was removed.
(There are a couple other places where $form = form_builder('form_id', $form) is called that perhaps could be replaced with drupal_prepare_form('form_id', $form).)
Rationale: This makes it possible for modules that do complex stuff with Taxonomy to still have what Taxonomy Manager does work too. The example in this case is Place (place_taxonomy, taxonomy_location) which is used on World Social Forum 2008.
(Offtopic: The main listing of terms, however, is not a form. Anyway to hook into that to disable or modify the setting of weights?)
benjamin, Agaric Design Collective
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | taxonomy_manager_term_data_form_alter_allow.patch | 491 bytes | mlncn |
Comments
Comment #1
mlncn commentedHere's the patch.
Comment #2
miklThis is fixed in Drupal 6.