Hi,
I am trying to develop an application using the multi step form. The forms created is Ok. But it is seriously lacking in features / options.
There are 2 scenarios for this:
- A multi step form with multiple tables where each step inserts into a different table. Assuming there are 10 steps and user decides to stop at 5 or gets interrupted. If we provide a button for each step to save only that part, then the multi step will be really worth using so that user can resume from that point onwards
- Need to show some special Button / Title on the menu section for a particular step,
Now both are not possible, since the sc_get_wizard_step() is crucial for these to work. Based on the step we are in we can carry out some special operations / logic
But the sc_get_wizard_step() has a scope only on Form/Validate.
I wonder how scriptcase developers have missed out on this…
I have to totally junk the application and look for another approach now unless some gives me some idea. Honestly disappointed. I have been regularly updating and this time I feel let down
Update 1: Ok So I have been trying out the multi step form further. I found some thing interesting.
Assuming there are 10 steps to be processed. The On Validate event fires on the following conditions:
a) On the exit of each Step and entering the next step. So, it actually fires between step 1 to step 9 Exit. We can not know the entry or exit of step 10. Similarly we can know if we have entered step 1. In other words the OnValidate Event of the FORM fires from exit of Step 1 to Exit of Step 9.
b) Going backwards, the OnValidate does not fire . So going to the previous step can not be tracked
UPDATE 2: As already mentioned above, using Multi Step Forms with Mandatory Steps , multiple data tables. Challenges : Track the navigation and store data on step navigation. I am planning to use mySql Json Field for temporarily storing data from each step. On final step completion, I plan to post this data into the main data tables (with regular columns). In case the user abandons the entries in between steps, the data will be stored as Json field. When client revisits, I can restore from the JSON fields and show the data and allow completion. I AM FOLLOWING @maxi s idea of using a view. mySql has no “instant trigger” feature, though
As for tracking backward navigation, I have found that the scriptInit gets fired for each step navigation (backward or forward) . The onValidate gets fired only on forward navigation of steps. As such I am using a simple incrementor to track the back and forth navigations.
NOTE: I am going to continually update this topic based on my trials. I request others to also contribute their valuables comments / observations. I will post my finished code here for comments and reference
Suresh