-1

I am using Smart Wizard, and I need to know if it can stay on the selected step if the page validation fails.

At the moment it is flagging the step red, but I need to prevent it from going to the next step until the validation errors are cleared.

Thanks

GreenGeckoZA
  • 21
  • 2
  • 7

2 Answers2

0

Ok, it seems one of my functions did not return the correct value. I also added the following code to force it back the selected step: $('#wizard').smartWizard('selected', '0');

GreenGeckoZA
  • 21
  • 2
  • 7
0

you have to return false in the leaveStep function in order to stop it from advancing to the next step

leaveStep = function(from, to) {
    //do nothing
    if(/* validation fails */)
        return false;
    else
        return true;
}