You are here

function seven_form_node_form_alter in Drupal 10

Same name and namespace in other branches
  1. 8 core/themes/seven/seven.theme \seven_form_node_form_alter()
  2. 9 core/themes/seven/seven.theme \seven_form_node_form_alter()

Implements hook_form_BASE_FORM_ID_alter() for \Drupal\node\NodeForm.

Changes vertical tabs to container.

File

core/themes/seven/seven.theme, line 156
Functions to support theming in the Seven theme.

Code

function seven_form_node_form_alter(&$form, FormStateInterface $form_state) {
  $form['#theme'] = [
    'node_edit_form',
  ];
  $form['#attached']['library'][] = 'seven/node-form';
  $form['advanced']['#type'] = 'container';
  $form['meta']['#type'] = 'container';
  $form['meta']['#access'] = TRUE;
  $form['meta']['changed']['#wrapper_attributes']['class'][] = 'container-inline';
  $form['meta']['author']['#wrapper_attributes']['class'][] = 'container-inline';
  $form['revision_information']['#type'] = 'container';
  $form['revision_information']['#group'] = 'meta';
}