how to reinitiate a default field value every time the content edition is loaded? i have a field that , if opt-in, send notifications.
I would like that when editing the content , the value is always reinitiated to opt-out, sitll leaving the possibility for the editor to opt-in again

this code below does it but then it is not possible to save an opt-in nomore

use Drupal\node\NodeInterface;

function mymod_entity_load(array $entities, $entity_type_id)    {

  foreach ($entities as $entity) {
    if ($entity instanceof NodeInterface) {
      if($entity-&gt;bundle()=='evenement'){
         $entity-&gt;field_notif=0;
      }
    }
  }
}
You need to use hook_form_alter 

    use Drupal\Core\Form\FormStateInterface;

    /*
     * Implementation of hook_form_alter()
     */
    function mymod_form_alter(&amp;$form, FormStateInterface $form_state, $form_id) {
      if($form_id == 'node_evenement_edit_form'){ // target a specific form
        $form['field_notif']['widget']['#default_value'] = 0;
      }
    }