* Generate a JSON string with the current formatted values from the ` ` elements, and pass it to the given callback. * Under the hood, the array is generated via a call to `formJsonFormatted()`. * * @param {function} callback * @returns {AutoNumeric}
(callback)
| 3493 | * @returns {AutoNumeric} |
| 3494 | */ |
| 3495 | formSubmitJsonFormatted(callback) { //FIXME test this |
| 3496 | if (AutoNumericHelper.isFunction(callback)) { |
| 3497 | callback(this.formJsonFormatted()); |
| 3498 | } else { |
| 3499 | AutoNumericHelper.throwError(`The given callback is not a function.`); |
| 3500 | } |
| 3501 | |
| 3502 | return this; |
| 3503 | } |
| 3504 | |
| 3505 | /** |
| 3506 | * Generate a JSON string with the localized strings values from the `<input>` elements, and pass it to the given callback. |
no test coverage detected