I have some vertical tabs I am trying to reorder and the dpm()'d weights are not matching the visual output. Can someone explain this or point me to the right documentation on how weights and vertical tabs work?

dpm weights

  • Where (theme/module) and which hook are you exactly calling? Commented Jan 14, 2013 at 16:49
  • I have a custom module called pub_tv and I am doing a hook_form_FORM_ID_alter(). I will also note that required information and additional information are provided by the field_group module. Meta tags is a contrib module. Commented Jan 14, 2013 at 17:45

1 Answer 1


If you are calling the hook function through your module it can happen that other modules are calling the same hook function after your hook. This would make the changes you made overwritten by the other module.

So if you want to make sure your hook is called last, either call the function in the themes template.php file or change the weight of your module to something higher so that it gets executed last. The second option would require you to edit the system table in the database.

  • If I use the #afterbuild property to call the dpm()'s then it still shows the weights out of order. This means the form is completely built at the time the dpm()'s in the screenshot are outputting their weights. Commented Jan 23, 2013 at 20:24
  • can you check the weight of the modules in the systems table. if possible alter it to a higher value in the db itself. Commented Jan 23, 2013 at 20:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.