I’ve got multiple form_alters in my D7 website. One contrib and one custom. I need the custom module to overwrite the contrib module. But for some reason, the custom module is committing second…
How can I change the processing order of the hook_alters in Drupal?
I’ve got multiple form_alter s in my D7 website. One contrib and one custom.
Share
You just need to pop into the
systemtable in your database and change thestatuscolumn for your module. If you want your hooks to run before another particular module’s then changestatusto a smaller number than the other module’sstatusin the table. If you want them to run after, change thestatusto a greater number.You’ll need to clear Drupal’s cache once you’ve made the change in the table so it gets picked up.
See How to update a module’s weight for a fuller explanation.