craue / CraueFormFlowBundle

Multi-step forms for your Symfony project.
MIT License
736 stars 118 forks source link

Skip step when going back #356

Closed lukaszkulinski closed 4 years ago

lukaszkulinski commented 4 years ago

Is it possible to skip steps on back? For example return to step 3 from step 5 skipping step 4?

craue commented 4 years ago

Yes. Skipping steps works in both directions.

lukaszkulinski commented 4 years ago

Sorry I did not explain exactly. I want to skip step only when I going back. For now skipping work for both directions for me

lukaszkulinski commented 4 years ago

Ok, I achieve this using requested transition

'skip' => function($stepNumber, FormFlowInterface $flow) { return $flow->getRequestedTransition() == 'back'; },