0

I wanted to change the moderation state control box input to a textarea like the image below shows. Currently the input only supports 128 characters but I believe log messages can hold much more in the database.

Moderation control input

1 Answer 1

1

I was able to achieve it with a hook. We can add the below PHP to a custom module. Make sure to change the name of MYMODULE below.

/**
 * Implements hook_form_FORM_ID_alter().
 */
function MYMODULE_form_content_moderation_entity_moderation_form_alter(&$form, FormStateInterface $form_state, $form_id) {
  // Change log message input to textarea on content moderation control boxes.
  $form['revision_log'] = [
    '#type' => 'textarea',
    '#title' => t('Log message'),
  ];
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.