new FormHelperRequest(formEl, rule, submitEvent)
FormHelperRequest instances are created automatically by FormHelper when
form matching any registered FormRule
submits. FormHelperRequest is not typically instantiated directly by the
user.
The FormRule's callbacks are executed in the context of the FormHelperRequest instance, so members listed below are available during any XHR callbacks and FormRule.StatusHandler
The FormRule's callbacks are executed in the context of the FormHelperRequest instance, so members listed below are available during any XHR callbacks and FormRule.StatusHandler
Parameters:
Name | Type | Description |
---|---|---|
formEl |
HTMLFormElement | Form element to be handled |
rule |
FormRule | The form's FormRule |
submitEvent |
Event | The form's original submit event |
- Mixes In:
- Source:
Namespaces
Methods
blankAllPasswordFields()
Clear the value of every password input field in the form
- Source:
cancel()
Cancels any further processing of the FormHelperRequest. Can be called
during a rule's xhrReady or xhrBeforeSend
callbacks to prevent FormHelper UI updates and XHR
- Source:
control(control) → {jQuery}
Find the control element for given name or id
Parameters:
Name | Type | Description |
---|---|---|
control |
String | Control name or id |
- Source:
Returns:
- Type
- jQuery
controlGroup(control) → {jQuery}
Find and return a jQuery-wrapped control group for a given control
Parameters:
Name | Type | Description |
---|---|---|
control |
String | jQuery | Control name or id string, or jQuery-wrapped control element |
- Source:
Returns:
- Type
- jQuery
find(selector) → {jQuery}
Shortcut for finding elements scoped within the form
Parameters:
Name | Type | Description |
---|---|---|
selector |
String | CSS Selector String |
- Source:
Returns:
- Type
- jQuery
redirect(location)
Cancels the request and forwards the browser to the given location
Parameters:
Name | Type | Description |
---|---|---|
location |
String | URL/path to go to |
- Source:
scrollToTopOfForm()
Scroll the page so the top of the form is at the top of the window
- Source: