You are here

function multiversion_form_alter in Multiversion 8

Same name and namespace in other branches
  1. 8.2 multiversion.module \multiversion_form_alter()

Implements hook_form_alter().

File

./multiversion.module, line 523

Code

function multiversion_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) {
  if (isset($form['revision']['#group']) && $form['revision']['#group'] == 'revision_information') {

    // Users don't have the option to disable revisions when using Multiversion.
    $form['revision']['#default_value'] = TRUE;
    $form['revision']['#disabled'] = TRUE;
  }
}