Question

I have a hook_form_alter in my module, but another module, workbench_access, also has a hook_form_alter which I need to be called before my hook_form_alter. How do I add weight to my hook_form_alter?

Was it helpful?

Solution

You just need to set the weight column for your module in the system table to higher than that of the Workbench Access module.

See How to update a module's weight for the different ways to do this. Once you have, clear Drupal's caches and your module's hooks will be called after those of Workbench Access modules (and most likely a lot of other modules).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top