MCPcopy
hub / github.com/autoNumeric/autoNumeric / _onFormSubmit

Method _onFormSubmit

src/AutoNumeric.js:7770–7777  ·  view source on GitHub ↗

* Handler for 'submit' events happening on the parent element. * If `unformatOnSubmit` is set to `true`, the element value is first unformatted before the form is submitted. * * @returns {boolean}

()

Source from the content-addressed store, hash-verified

7768 * @returns {boolean}
7769 */
7770 _onFormSubmit() {
7771 // Search for all the AutoNumeric children of the form element and call the `_unformatOnSubmit()` function
7772 const inputElements = this._getFormAutoNumericChildren(this.parentForm);
7773 const aNElements = inputElements.map(aNElement => this.constructor.getAutoNumericElement(aNElement));
7774 aNElements.forEach(aNElement => aNElement._unformatOnSubmit());
7775
7776 return true;
7777 }
7778
7779 /**
7780 * Handler for 'reset' events caught on the parent <form> element.

Callers 1

_setupFormListenerMethod · 0.95

Calls 3

getAutoNumericElementMethod · 0.80
_unformatOnSubmitMethod · 0.80

Tested by

no test coverage detected