Automatically load pending draft I'm using drupal 8 and webform module (multistep). In the webform submission settings, i enabled submit several drafts which adds the 'save' button for saving the progress.
When the user logs out and logs in later on, a messsage to 'load pending draft' appears. In my settings, each user is allowed one submission. Is there a way to automatically load pending drafts without clicking on the link in the said message?

Appreciate any help given, thanks
There is. When a user's saves draft a token gets generated. You need to get their token value.

$webform_submission = \Drupal\webform\Entity\WebformSubmission\WebformSubmission::load($sid);
$token = $webform_submission-&gt;getToken();


Then, you need to generate a URL like this

$draft_url = '/form/webform-name?token=' . $token


and on login redirect them to that url.