Set default vertical tab

Public

In this example: set “Publishing options” vertical tab as default for node edit page.

</> CopyGet raw version
php
  1. /**
  2.  * Implements hook_form_FORM_ID_alter().
  3.  */
  4. function YOURMODULE_form_node_form_alter(&$form, $form_state) {
  5. // Set default tab.
  6. $form['additional_settings']['#default_tab'] = 'edit-options'; // Where 'edit-options' is fieldset ID.
  7. }

Comments

Marco's picture

Thanks, very helpful!