Skip to main content
Category:

How to make modification of a revision log field in drupal 8 & 9

 

Example How to make modification of a revision log field in drupal 8 & 9:

 

use Drupal\Core\Form\FormStateInterface;

/**
 * Implements hook_form_alter().
 */
function MODULE_form_alter(array &$form, FormStateInterface $form_state, $form_id) {
  if ($form_id == 'article_add_form') {
    $form['revision_log']['widget'][0]['value']['#title'] = 'Aricle version';
    $form['revision_log']['widget'][0]['value']['#description'] = 'Description of revision';
  }
}

Riadh Rahmi

Senior Web Developer PHP/Drupal & Laravel

I am a senior web developer, I have experience in planning and developing large scale dynamic web solutions especially in Drupal & Laravel.

Web Posts

Search

Page Facebook