Class: Wizard

Wizard

Templates, serializes, submits, and controls a form wizard

Constructor

new Wizard(optionsopt)

Constructor
Parameters:
Name Type Attributes Description
options object <optional>
Properties
Name Type Attributes Description
struct object <optional>
Properties
Name Type Attributes Default Description
$wrapper string <optional>
'.wizard' wizard wrapper
$nav string <optional>
'.nav' navigation list
$navs string <optional>
'.nav > li' navigation links
$tabs string <optional>
'.tab-pane' tab container
$next string <optional>
'.pager .next' next button
$pager string <optional>
'.pager' pager container
$previous string <optional>
'.pager .previous' previous button
Source:

Extends

Methods

appendSerializedData() → {Form}

Append serialized data
Parameters:
Type Description
Inherited From:
Source:
Returns:
Type
Form

build(data) → {Form}

Build inputs from cols
Parameters:
Name Type Description
data object | Array.<object> data for a form input
Inherited From:
Source:
Returns:
Type
Form

clean() → {Form}

Remove all data from the form and reset it
Inherited From:
Source:
Returns:
Type
Form

initialize() → {Form}

Initialize as a clean form with default values from the DOM
Inherited From:
Source:
Returns:
Type
Form

lockSubmit(ms)

Lock the submit button for some amount of ms
Parameters:
Name Type Description
ms number time to lock in milliseconds
Inherited From:
Source:

populateForm(data) → {Form}

Populate form fields
Parameters:
Name Type Description
data object collection of properties whos key match an input or select name, and whos value is appropriate for that field
Inherited From:
Source:
Returns:
Type
Form

resetForm() → {Wizard}

Reset the form
Overrides:
Source:
Returns:
Type
Wizard

resetNavValidation() → {Wizard}

Reset nav validation
Source:
Returns:
Type
Wizard

serializeForm() → {Form}

Public function to serialize the form, as jQuery uses serialize already
Inherited From:
Source:
Returns:
Type
Form

slideToggleForm(state) → {Wizard}

Toggle wizard components
Parameters:
Name Type Description
state boolean
Overrides:
Source:
Returns:
Type
Wizard

toggleButtons(state) → {Form}

Toggle the button states
Parameters:
Name Type Description
state boolean
Inherited From:
Source:
Returns:
Type
Form

toggleForm(state) → {Wizard}

Toggle wizard components
Parameters:
Name Type Description
state boolean
Overrides:
Source:
Returns:
Type
Wizard

toggleNextButton(state) → {Wizard}

Toggle the next button
Parameters:
Name Type Description
state boolean
Source:
Returns:
Type
Wizard

togglePreviousButton(state) → {Wizard}

Toggle the previous button
Parameters:
Name Type Description
state boolean
Source:
Returns:
Type
Wizard

toggleSubmitButton(state) → {Wizard}

Toggle the submit button
Parameters:
Name Type Description
state boolean
Source:
Returns:
Type
Wizard

validate() → {boolean}

Validate the form
Inherited From:
Source:
Returns:
Type
boolean

validateAllTabs() → {boolean}

Validate all tabs
Source:
Returns:
Type
boolean

validateCurrentTab() → {boolean}

Validate the current tab
Source:
Returns:
Type
boolean

validateNextTab() → {boolean}

Validate the next tab
Source:
Returns:
Type
boolean

validatePreviousTab() → {boolean}

Validate the previous tab
Source:
Returns:
Type
boolean

validateTab($tab) → {boolean}

Validate a tab
Parameters:
Name Type Description
$tab jQuery
Source:
Returns:
Type
boolean