Multiple Combinations Of Multi-Page Form

Hi,

I have 4 page form which works fine. I now have a requirement wherein based on the input provided in the second page, the subsequent number of pages and information collected in them will be quite different. That is, the forms and the flow from the third page to the last page will be different though the functionality achieved is the same. Can anyone please suggest an elegant solution to accomplish this? I have been exploring controller/action inheritance but it seems to be tricky for multi-page form. Any design pattern that I should be exploring?

Thank you.

This extension provides a solution. Would like to know if there are simpler solutions, not necessarily a very generic one like this extension.