Hey Matt, thanks for posting this snippet. Very useful.
I’ve noticed that when I try to use this snippet in a button that “Runs Multiple Actions”, I get the following error:
“Uncaught TypeError: Cannot read property ‘steps’ of undefined”
Please see the images below:
Would you happen to know how to tweak the code to avoid this? Thanks.
This seems like a great solution for greater button placement flexibility - thanks for sharing! One clarification - does this approach pick up all the configuration for a given button? eg if it is run multiple actions or if it has settings for model save.
Hey Chris, yes it works for multiple actions - which is exactly the kind of functionality i was looking for (being able to run a snippet, as well as standard Skuid button actions).
Ok, so I gave this a try but I don’t quite understand the logic of how to match up the buttons on wizard with these. In my case I have 3 buttons on most pages (back, save and exit, next). I was able to get the back and next buttons to work but couldn’t figure out how to make a button to match the “save and exit” (which is a model save and redirect to url action).
Also, to clarify, my understanding is this approach requires one JS snippet for each type of button (ie one for back, one for next, …). Is that correct?
The save and exit button should not require a snippett. The only reason the back and next buttons need js is because we have not exposed the navigation process more widely than just the wizard component. So items that are IN the wizard can’t affect the wizard step.
You could run this script from a Button using the Action Framework. The script checks which step you are on and jumps you to the next step. The Wizard Component buttons alllow you to navigate steps directly.
If you are on a recent version of Skuid (Millau), you can navigate steps in the wizard from the Action Framework–no need for a snippet. Create an action step to Run Component Action, then select your wizard component, then your step.