Feedback Laraform is now in maintenance mode. Read more on our GitHub.

wizard$ - <FormWizard>

Component used by Wizard.

#Properties

Name Type Default Description
steps object - Steps definition. required
elements$ object - Form element components. required
events array [] Helper property used to store available events.
steps$ object {} Object of wizardStep$ components.
pending boolean - Determines whether the wizard has any pending elements.
debouncing boolean - Determines whether the wizard has any debouncing elements.
invalid boolean - Determines whether the wizard has any invalid elements.
done boolean - Determines whether all the steps are completetly filled out.
busy boolean - Determines whether the wizard has any pending or debouncing elements.
visible$ object - Returns the visible wizardStep$ components.
first$ wizardStep$ - Returns the first wizardStep$ component.
current$ wizardStep$ - Returns the current wizardStep$ component.
next$ wizardStep$ - Returns the next wizardStep$ component.
previous$ wizardStep$ - Returns the previous wizardStep$ component.
firstInvalid$ wizardStep$ - Returns the first invalid wizardStep$ component.
firstNonDone$ wizardStep$ - Returns the first wizardStep$ component which is not done yet.
lastEnabled$ wizardStep$ - Returns the last enabled wizardStep$ component.
isAtLastStep boolean - Determines whether the wizard is at the last step.
isAtFirstStep boolean - Determines whether the wizard is at the first step.

#Methods

# .on(event, callback)

Parameters
  • event string : event to listen for.
  • callback function : callback to run when the event is triggered. The this variable refers to the component the listener is set for.

Adds a listener for an event.


# .off(event)

Parameters
  • event string : event to remove the listeners for.

Removes all listeners for an event.


# .fire(event, args) @returns {any}

Parameters
  • event string : event to fire.
  • args object : arguments to pass for the event's listeners.

Fires an event.


# .__(expr, data) @returns {string}

Parameters
  • expr string : expression to be translated using . dot syntax.
  • data object : data to be passed for the expression

Translates an expression to current locale.


# .goTo(step)

Parameters
  • step object : key of step in wizard

Moves to a step. If it is disabled, enables it.


# .next()

Moves to next step and enables it.


# .previous()

Moves to previous step.


# .finish(callback)

Parameters
  • callback function : callback to call when the form is ready to submit

Validates all unvalidated elements and if everything is fine marks all steps as complete and initiates submission. If the form is invalid it will jump to the first step which has invalid elements.


# .complete()

Marks each wizardStep$ as complete.


# .step$(step) @returns {wizardStep$}

Parameters
  • step object : key of step in wizard

Returns a specific wizardStep$.


# .reset()

Resets form and goes back to first step while disabling all others.


# .enableAllSteps()

Enables all steps.


# .completeAllSteps()

Completes all steps.


# .submit()

Su


#Events

# next

Triggered when moves to next step. Can prevent further execution if returns false.


# previous

Triggered when moves to previous step. Can prevent further execution if returns false.


# finish

Triggered when finishes. Can prevent further execution if returns false.


# select

Triggered when a step is selected.