Class: Zangdar

Zangdar

new Zangdar (selector, options)

Name Type Description
selector HTMLFormElement | String
options Object

Members

currentIndex

Returns current step index

steps

Returns all wizard steps

uniqueId

Returns form unique ID

Methods

_bindEventsContext () private

_buildForm () private

_buildPrevButton () private

_buildSection (label)Element private

Name Type Description
label String
Returns:
Type Description
Element

_buildStep (item, index) private

Name Type Description
item Object
index Number

_buildSteps () private

_hidePrevBtns () private

_init () private

_nextStep () private

_onNextStep (e) private

Name Type Description
e Event

_onPrevStep (e) private

Name Type Description
e Event

_onStepChange (oldStep, direction) private

Name Type Description
oldStep WizardStep
direction Number

_onSubmit (e) private

Name Type Description
e Event

_prevStep () private

_revealStep () private

_validateCurrentStep () private

createFromTemplate (template)Zangdar

Create a wizard from an existing form with a template which is describes it

Name Type Description
template Object

the wizard template

Returns:
Type Description
Zangdar

destroy ()

Destroys wizard instance

TODO

getBreadcrumb ()Object

Returns:
Type Description
Object

getCurrentStep ()WizardStep | null

Get the current step

Returns:
Type Description
WizardStep | null the current WizardStep instance if exists, null otherwise

getFormElement ()HTMLFormElement

Get wizard HTML form element

Returns:
Type Description
HTMLFormElement

getStep (key)WizardStep | null

Get a step

Name Type Description
key String | Number

step index or label

Returns:
Type Description
WizardStep | null WizardStep instance if exists, null otherwise

next ()Zangdar

Reveal next step

Returns:
Type Description
Zangdar

prev ()Zangdar

Reveal previous step

Returns:
Type Description
Zangdar

refresh ()Zangdar

Refresh wizard instance

Returns:
Type Description
Zangdar

revealStep (value)Zangdar

Go to a step by label (data-step attribute value)

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