I am building a webform that has multiple pages. The idea is that the user leaves the wizard after each page that he submits. When he later returns, he automatically starts the form on the unanswered page.
The reason for this behaviour is that doing so, we can keep the records of all the 'sub-surveys' together as one single submission.
I successfully have set up custom handlers based on the example module. I can see that the handler is working.
To accomplish the desired scenario, I thought that it is probably best to log the user out in the {submitForm} function of the handler and set the redirect ($form_state->setRedirect).
The redirect doesn't happen, but the logout does. What I end up with now, is that the user sees his next page, but can't submit it because he is actually logged out. It's fine that he can no longer submit. But it's not ideal that he sees the next page in the form. That is why i try to redirect.
I read in another question on stackexchange that the redirect should be set in the confirmForm, but that doesn' work either. Maybe because confirmForm only happens at the end of the wizard or something.
Any suggestions on how to redirect after (each, or some based on a condition) pages from the wizard?
Thanks.