Scriptcase v 9.7 with Multstep Form / Wizard Form is great but lacking a lot

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:

  1. 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
  2. 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

2 Likes

Hy.

You can achieve 1) if your database supports the so called Instead Of trigger on view.

Create a multi step form on a view.
The view can be based on your 10 tables. One table for each step.

Create an Instead of trigger firing on view insert and update and put sql logic in such trigger.

i would like the multistep wizzard to also support grids. I use different grids with buttons in the lines that a user can select to give his his choice an ajax run button then reloads the form, stores the value in a table, and gives that button another color and another text. eg. i use a grid to store user preferences in a table.

if i want to collect different choices i now use a button (NEXT) to go to a different grid. but the wizzard shows nice tabs above. Tried to use tabs, but i can’t get another tab active the the first one. eg. a NEXT button in the tabs should also be great.

I want t use the multistep form to update and existing record. Anyone had luck opening the form to a specific record ID? I can’t seem to get it to do so.

In the form app named s3provider – in the SQL Where clause:
ProviderID = [s3providerid]

This is a global incoming.

I call the form from a control using this code in a PHP button:
sc_apl_conf(s3provider,update,on);
sc_redir(s3provider,s3providerid={ProviderID}); // pass the record ID

The form opens with empty fields, not the values for the ProviderID passed in. I know it is passing the ID value, as I can use that global in the layout title of the form and it shows the passed in value.

Any ideas?

Try
sc_redir(s3provider,’’,s3providerid={ProviderID}); // pass the record ID

Hi @onmountain
Seeing your message I tried the same. I did the following

  1. I created a new Multi step Form connecting to a table with a Primary Key row ID.
  2. I set a fixed value directly at the Where clause as table_row_id = 2 or table_row_id = 3
    I am not using an sc_redir etc.
    Result: Only blank row shown. Insert is working though. I inserted 3 rows, which is working fine.
    Next I tried this with a simple form which is not a multiple step.
  3. I created a simple form (no multi step option) with the same table
  4. I set a fixed value with 1 , 3, 2 etc. The records related to 1 ,3 and 2 are shown

My assumption: (Forgive me if I am wrong)
The where clause is not working if it is a multi step form. This could be a possible bug or a planned logic by SC developers
Suresh

Ok I did some testing after getting a working sample from Scriptcase support. Their sample had the toolbar settings With the First/ Last / Next / Previous options. Any one of these options included in the ToolBar will trigger the Where Clause and also the display of the existing data.
I had to compare my form and the sample form for a long time before I hit on this.
Then to really confirm, I removed the First/Last/Next/Previous in the tool bar and even the sample form was not able to show the data as per the where clause. But the moment I add any one of the options, it starts to work properly
Please see the screen shot. Attach any one option from the green box in the image