I`ve already wrote some working code, but still cant understand how does those hooks work.
Now I stuck with form_alter - need to remove taxonomy select from node add form (adding term id later, on validate).

It worked, but now its not working again - dont remember what I changed.

$form comes to mymodule_form_alter with no $form['taxonomy'], so "$form['taxonomy']=array()" takes no effect - the select appears on the form.
I gues it is adding by the same form_alter somewhere in taxonomy module, UFTER CALLING MY HOOK.

How can I set my hook to be the LAST called hook to recieve final $form?
How does Drupal define the order to call hooks?

Comments

alexandreracine’s picture

or again here http://drupaldocs.org/api/4.6

By the way, I don't know what are hooks, so don't ask :)

ok ok, it seems to be some procedures that you can call or intercept, but that is about it. Read on in the link for more.

Alexandre Racine

www.gardienvirtuel.com Sécurité informatique, conformité, consultation, etc

www.salsamontreal.com La référence salsa à Montréal

Budrick’s picture

Thanks.
I am aware that there are some documentation.
And I`ve read it throughout before posting here.

robertdouglass’s picture

I'm completely unsure about this and you'll want to double check and report back here, but it could be that the weight column of the system table lets you influence the order of the modules when a hook is getting invoked. See here. The last update is setting the weight and I am guessing that this is done because the devel module should be invoked last. Like I said, though, I'm guessing based soley on little things I saw or overheard and don't claim to know the real answer (but want to know what the real answer is =)

- Robert Douglass

-----
My Drupal book: Building Online Communities with Drupal, phpBB and WordPress

Budrick’s picture

Yes it works! Thanks a lot!

Discussion moved here.
____________________________________________________________
Сауны и бани Алматы

robertdouglass’s picture

...I was in the exact position where I needed to use this technique =)

- Robert Douglass

-----
My Drupal book: Building Online Communities with Drupal, phpBB and WordPress