This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

reynierpm
reynierpm

Ok, I'm working on a component where things will act as a wizard. The wizard will have only three steps. So what is my idea, coming from old PHP style, have some functions lets call it functionStepTwo and functionStepThree because on step one I execute some code and return it to the view using the Ajax Framework. Now in each view I have a "Next" button so any time I click on that button I should go to the next step depending on which step I'm on. Ex: I'm on Step1 then Next button should go to wizard Step2 and execute on init the function called functionStepTwo and then when I hit Next button on Step2 then I should go to wizard Step3 and execute on init the function called functionStepThree. I won't allow to go back so this is a one way wizard. Now having this, here are my doubts:

  • How do I execute the right function on each step advance as I explained before? (something like for example page/step2 will execute functionStepTwo and page/step3 will execute functionStepThree, understand what I'm trying to do here?)
  • How do I manage the view in order to toggle each partial when I move forward? Because the three steps are on the same component then I think to go trough default.htm template and the have three partials but how I display the right one on forward?

Any ideas or help on this? Thanks in advance

1-1 of 1

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.