Identify submit button in webform I am trying to add additional submit buttons to the webform to navigate between different steps. I have added button like below:

function mymodule_form_alter(&amp;$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) {

  if($form_id == 'mywebform_id') {

    $form['actions']['submit_button_step_1'] = array(
      '#type' =&gt; 'submit',
      '#value' =&gt; t('Go to Step 1'),
      '#submit' =&gt; array('custom_navigation'),
    );

    $form['actions']['submit_button_step_2'] = array(
      '#type' =&gt; 'submit',
      '#value' =&gt; t('Go to Step 2'),
      '#submit' =&gt; array('custom_navigation'),
    );
  }
}

function custom_navigation(&amp;$form, \Drupal\Core\Form\FormStateInterface $form_state) {

  $value = $form_state-&gt;getValues();
  //echo '&lt;pre&gt;';print_r($form['actions']);echo '&lt;/pre&gt;';exit;
}


But, I'm using same custom submit handler both the custom buttons. How I identify which button has clicked by user? And based on user click I need to redirect user to corresponding wizard page.
Below codes work for two submit buttons given at webform for identify which button is click.

function modulename_form_submit(&amp;$form, FormStateInterface $form_state) {

  $myurl = FALSE;
  $triggerElement = $form_state-&gt;getTriggeringElement();

  if (isset($triggerElement['#id']) &amp;&amp; $triggerElement['#id'] == 'COMPARE BUTTON ID') {
    $myurl = Url::fromUri('internal:/SETYOURFIRSTACTIONPATH');
  }

  if (isset($triggerElement['#id']) &amp;&amp; $triggerElement['#id'] == 'COMPARE ANOTHER BUTTON ID') {
    $myurl = Url::fromUri('internal:SETYOURSECONDACTIONPATH');
  }

  if ($myurl) {
    $form_state-&gt;setRedirectUrl($myurl);
  }
}