How do I alter webform values before submission? I am trying to add some values to a hidden field in my webform before submission. Is there any hooks to access webform submission in Drupal 8? I tried How do I modify a webform submission field right before it is saved? without luck.
The answer linked is mostly right, just a couple of updates to get it working. In a custom .module add:

use Drupal\Core\Form\FormStateInterface;

function MODULENAME_form_alter(&amp;$form,$form_state, $form_id) {
  if ($form_id == 'FORMID') {
    $form['actions']['submit']['#validate'][] = 'MODULENAME_form_validate';
  }
}

function MODULENAME_form_validate($form, FormStateInterface $form_state) {
  $form_state-&gt;setValue('hidden_id', 'Value for Hidden field');
}