Dec 08, 2020 in Drupal 8
When using the node system we have a checkbox on the edit page to deactivate a log field. For custom entities we need to do it ourselves. To your modules/mymodule.module file add:
use Drupal\Core\Form\FormStateInterface;
/**
* Implements hook_form_alter().
*/
function mymodule_form_alter(array &$form, FormStateInterface $form_state, $form_id) {
if ($form_id == 'MYENTITY_add_form') {
$form['revision_log']['#access'] = FALSE;
}
}