The Form API, like many other components of Drupal, provides options to order form elements through the use of weights. In this recipe, we will exercise this and other features to reorganize the structure of a typical node form.
We will be using the mysite module created earlier in this book to contain our
hook_form_alter(). Fields provided by the Menu module will be among those that we will be looking to tweak and it is therefore assumed that the module is enabled.
It is also recommended that the Devel module be enabled to help with diagnostic prints and other debugging efforts.
In this recipe, we are going to look to restructure the vertical tabs present at the bottom of every node form. ...