dixonwille / wmenu

An easy to use menu structure for cli applications that prompts users to make choices.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to pass answer from one menu to another

phamdt opened this issue · comments

i have a wizard with multiple questions and therefore multiple menus. i want subsequent menus to depend on data from previous menus. how could i achieve this?

@phamdt Sorry I am just now reading this. If you give me to end of the day I will get back to you. I never got notified.

thanks!

@phamdt sorry for the long wait. Work has me busy.

I just pushed up an example folder that goes through one way of doing subsequent menus. There is more than one way to do it. I have done it a different way for tools at my workplace (cannot share those I am sorry).

Another way is instead of a single action for all options, give each option a different action. Each different action would generate a different menu and run it similar to how the single action for all choices work. The beauty of programming is there is always more than one answer. Let me know if this helps.

Will take a look. Thanks!