mgildea / Multi-Step-Form-Js

Multi Step Form with jQuery validation
MIT License
49 stars 25 forks source link

Any idea how to skip a step? #16

Closed souldesigns closed 6 years ago

souldesigns commented 6 years ago

Hi, for example if I wanted to directly jump to the 3rd step in your example form here: http://www.bestjquery.com/?tLERh8Pq

Is there a way to jump to the third or Nth step of the process with a button / tag?

thanks !

mgildea commented 6 years ago

Yes this is doable:

you can use some combination of the allowUnvalidatedStep and allowClickNavigation options

see the description of these options in the README.

you should be able to do something like this:

//this allows you to access subsequent steps without the previous ones being 100% validated.
var msf =  $(".msf:first").multiStepForm({
        allowUnvalidatedStep : true
});

//setup your event handler and call 
msf.setActiveView(2);