state
This method returns the state of the wizard. The data returned is the following:
- settings - Object - the current settings of the wizard (see Options)
- activatedSteps - Array - contains the activated steps of the wizard
- isLastStep - boolean - true if the current step is a submit step
- isFirstStep - boolean - true if the first step is the current step
- previousStep - String - the id of the previous step
- currentStep - String - the id of the current step
- backButton - Selector - contains the backButton
- nextButton - Selector - contains the nextButton
- steps - Selector - contains the steps of the wizard
- firstStep - String - the id of the first step
example method call
$("#demoForm").formwizard("state");
example data
{
"settings" : {
historyEnabled : false,
validationEnabled : false,
validationOptions : undefined,
formPluginEnabled : false,
linkClass : ".link",
submitStepClass : "submit_step",
back : ":reset",
next : ":submit",
textSubmit : 'Submit',
textNext : 'Next',
textBack : 'Back',
remoteAjax : undefined,
inAnimation : {opacity: 'show'},
outAnimation: {opacity: 'hide'},
inDuration : 400,
outDuration: 400,
easing: 'swing',
focusFirstInput : false,
disableInputFields : true,
formOptions : { reset: true,
success: function(data) { alert("success"); }
},
"activatedSteps" : ['firstStep','secondStep','thirdStep'],
"isLastStep" : true,
"isFirstStep" : false,
"previousStep" : 'secondStep',
"currentStep" : 'thirdStep',
"backButton" : Object,
"nextButton" : Object,
"steps" : Object,
"firstStep" : 'firstStep'
}
show
This method takes care of showing a specified step in the wizard.
Parameters
- id - the element id of the step to show
example method call
$("#demoForm").formwizard("show","firstStep");