API Documentation for: 1.1.2
Show:

Canteen.Forms Class

Namespace: Canteen

Override all the basic form submission to process forms using Ajax and stateless behavior.

Item Index

Methods

Properties

Methods

destroy

() static

Clean up any form elements

formFeedback

(
  • form
  • message
  • error
)
static

Show the form feedback

Parameters:

  • form JQuery

    The form to display feedback form

  • message Array

    The message list of string feedback messages

  • error Boolean

    If the feedback is error

setup

(
  • site
  • debugForms
)
static

Setup form with helper javascript

Parameters:

  • site Canteen.Site

    The instance of the site

  • debugForms Boolean

    If we should use ajax for forms

Properties

CONFIRM

String final static

The constant class name to add a confirmation dialog to a button

Default: confirm

DISABLED

String final static

The constant For the disabled class

Default: disabled

ERROR

String final static

The constant for the error class

Default: error

FEEDBACK_ERROR

String final static

Form feedback when errored

Default: formError

FEEDBACK_SUCCESS

String final static

Form feedback when successful

Default: formSuccess

REQUIRED

String final static

The constant for the required class

Default: required

SELECTED

String final static

The constant for the selected class

Default: selected