new PureWizard(config)
Creates a wizard instance
Parameters:
Name | Type | Description |
---|---|---|
config |
Object | The defaults values for wizard config |
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
config.wizardNodeId |
String | Id of main section that contains wizard | ||
config.errorClass |
String |
<optional> |
'has-error' | Custom style for validation errors |
config.stepsSplitCssQuery |
String |
<optional> |
'fieldset' | Form will be splited into the steps with this query. |
config.hideNextPrevButtons |
Boolean |
<optional> |
'true' | Show as disabled or hide the wizard buttons when they are not available |
config.startPage |
Number |
<optional> |
'0' | Open form at the particular page number, starts from 0, |
config.statusContainerCfg |
Object |
<optional> |
'{}' | Allow to configure a status panel |
- Source:
Methods
getCurrentPage() → {PureWizadPage}
Get current page
- Source:
Returns:
- Type
- PureWizadPage
getCurrentPageNumber() → {Number}
Get current page index, starts from 0
- Source:
Returns:
- Type
- Number
goToPage(pageNumber, skipValidationopt) → {Boolean}
Go to page
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
pageNumber |
Number | page number to navigate, starts from 0 | |
skipValidation |
Boolean |
<optional> |
skip validation when switching the page |
- Source:
Fires:
Returns:
- Type
- Boolean
next()
Move to next page if present
- Source:
onPageChanged(callback)
Subscription to an event when the page is changed
Parameters:
Name | Type | Description |
---|---|---|
callback |
function | Executes after page is changed |
- Source:
onSubmit(callback)
When the form is submit
Parameters:
Name | Type | Description |
---|---|---|
callback |
function |
- Source:
prev()
Move to previous page if present
- Source:
toggleButtons()
Toggle next, prev, submit buttons state depending the current wizard states
- Source: