import {AJAXFormControllerDelegate} from '~/delegate/FormControllerDelegate.js'
AJAXFormControllerDelegate
Extends:
Submits to same endpoint as original form but instead
Method Summary
Public Methods | ||
public |
didSubmissionError(controller: FormController, error: Object, status: number) Called when AJAX errored |
|
public |
didSubmissionSuccess(controller: FormController, response: Object) Called when AJAX finished with no error. |
|
public |
formWillSubmit(controller: FormController): boolean Will perform AJAX submission for the form. |
|
public |
setProgressState(controller: FormController, state: boolean, response: Object) Sets the form's progress state. |
Inherited Summary
From class FormControllerDelegate | ||
public |
formDidError(controller: FormController, errors: FormError[]) Called when the form attempts to submit. |
|
public |
formDidSubmit(controller: FormController) Called right after the form has submited (succesful validation) |
|
public |
formWillSubmit(controller: FormController): boolean Called right before the form will submit. |
Public Methods
public didSubmissionError(controller: FormController, error: Object, status: number) source
Called when AJAX errored
Params:
Name | Type | Attribute | Description |
controller | FormController | FormController |
|
error | Object | Error object |
|
status | number | Error status code. |
public didSubmissionSuccess(controller: FormController, response: Object) source
Called when AJAX finished with no error.
Params:
Name | Type | Attribute | Description |
controller | FormController | FormController |
|
response | Object | Response data |
public formWillSubmit(controller: FormController): boolean source
Will perform AJAX submission for the form. If you are subclassing use
return super.formWillSubmit(controller);
.
Params:
Name | Type | Attribute | Description |
controller | FormController | Form controller to request. |
public setProgressState(controller: FormController, state: boolean, response: Object) source
Sets the form's progress state.
Params:
Name | Type | Attribute | Description |
controller | FormController | FormController |
|
state | boolean | Loading state to set to. |
|
response | Object | Response data |