Alter Ajax callback on Webforms I'm loading a webform on a Ajax modal dialog. The form submission is also set to Ajax. I want to alter the Ajax submit callback so I can have more control over the form behaviour. I'm not being able to do that. The callback being executed is always submitAjaxForm, set on the WebformAjaxFormTrait trait.
Try using a 

hook_form_alter(&amp;$form, FormStateInterface $form_state, $form_id) {
  ....
  if (isset($form['actions']['submit'])) {
    $form['actions']['submit']['#ajax'] = [
      'callback' =&gt; '/path/to/your/controller/or/webformhandler/submitModalFormAjax',
      'event' =&gt; 'click',
    ];
}


in your *.module and then implement the callback function somewhere

public static function submitModalFormAjax(array &amp;$form, FormStateInterface $form_state) {...}