Score:0

Changing the Moderation State Control Box input to a textarea

au flag

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

Score:1
au flag

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'),
  ];
}
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.