Name | Type | Description |
---|---|---|
selector |
HTMLFormElement | String | |
options |
Object |
Properties:
Name | Type | Description |
---|---|---|
#steps |
Array.<WizardStep> |
Members
-
-
-
-
Returns current step index
-
-
steps Array.<WizardStep> private
-
-
Returns all wizard steps
-
Returns form unique ID
-
Methods
-
Returns:
Type Description number -
createFromTemplate (template)Zangdar
-
Create a wizard from an existing form with a template which is describes it, according to the options passed on wizard instance creation.
Useful to convert programmatically a HTML form into a powerful Zangdar wizard (by keeping only choosen fields).
Name Type Description template
Object the wizard template
Returns:
Type Description Zangdar -
Destroys wizard instance
- TODO
-
- destroy wizard
-
first ()Zangdar
-
Reveals first step
Returns:
Type Description Zangdar -
Returns:
Type Description Object -
getCurrentStep ()WizardStep | null
-
Get the current step
Returns:
Type Description WizardStep | null the current WizardStep instance if exists, null otherwise -
Get wizard HTML form element
Returns:
Type Description HTMLFormElement -
getStep (key)WizardStep | null
-
Get a WizardStep instance via his index or his label property (data-label attribute).
Name Type Description key
String | Number step index or label
Returns:
Type Description WizardStep | null WizardStep instance if exists, null otherwise -
last ()Zangdar
-
Reveals last step
Returns:
Type Description Zangdar -
next ()Zangdar
-
Reveals next step
Returns:
Type Description Zangdar -
Name Type Description e
Event -
Name Type Description e
Event -
Name Type Description e
Event -
prev ()Zangdar
-
Reveals previous step
Returns:
Type Description Zangdar -
refresh ()Zangdar
-
Refresh wizard instance
Returns:
Type Description Zangdar -
Remove a step based on his index, label property (data-label attribute) or WizardStep instance
Name Type Description key
WizardStep | String | Number Returns:
Type Description Number | Boolean returns the index of removed step if exists, false otherwize -
revealStep (value)Zangdar
-
Reveal a single step based on his index, label property (data-label attribute) or WizardStep instance
Name Type Description value
String | Number | WizardStep Returns:
Type Description Zangdar -
setOption (key, value)Zangdar
-
Name Type Description key
String value
* Returns:
Type Description Zangdar