Goto page in webform or submit I've got a Drupal 8 webform with a multi page wizard. I know that it is possible to "jump" to a specific page if I implement hook_webform_submission_form_alter() and add my own submit function to change the formState current_page to my desired page. But I want to check a value from a previous page and if the value is value_a I want to submit the form. If it is value_b I want to go to page b and if its value_c I want to go to page c.

$pages = $formState-&gt;get('pages');

if ($formState-&gt;get('type') === 'value_b') {
    $pageName = 'page_b';
    gotoStep($pageName, $pages, $formState); // this is my custom function to go to the desired page
} else if ($formState-&gt;get('type') === 'value_c') {
    $pageName = 'page_c';
    gotoStep($pageName, $pages, $formState); // this is my custom function to go to the desired page
} else {
    // SUBMIT FORM. HOW TO DO THIS?
}
I switched to the latest dev release ob the webform module and could skip the wizard pages depending on previous values without having to code anything. Thanks for the tip @jrockowitz ;)