0

I am trying to skip a step in multistep node form using Simple Multistep module. I have tried following snippet that works pretty good to skip one step.

$skipStep = $form_state->get('multistep_controller');
$skipStep->increaseStep();
$form_state->setRebuild();

However, it has a problem click on back button it doesn't come back.

I have search a lot but no luck, do anyone have idea?

0

I have solved it by using reduceStep() method to come back.

$skipStep->reduceStep();
$form_state->set('multistep_controller', $skipStep);
$form_state->setRebuild();

Hope this would help someone.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.