You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AutoNumeric elements provide special functions to manipulate the [form](https://developer.mozilla.org/en-US/docs/Learn/Forms) they are a part of.
198
-
Those special functions really work on the parent `<form>` element, instead of the `<input>` element itself.
198
+
Those special functions really work on the parent `<form>` element, instead of the `<input>` element itself.
199
199
200
-
The functions below makes retrieving and sending form values back to the server easily, be it formatted on not.
200
+
Form functions can be divided in two categories:
201
+
202
+
- Functions that manipulate the form values, and
203
+
- Functions that submit the form values to the server.
204
+
205
+
### Access and manipulate the form values
206
+
207
+
The functions below makes retrieving and preparing the form values easy. Those values can be formatted or not, and in any format you would want (`Array`, JSON, string, etc.).
208
+
209
+
You can then decide how and when to send those form values to the server.
@@ -219,6 +228,11 @@ The functions below makes retrieving and sending form values back to the server
219
228
|`formUnformatLocalized`| Unformat all the AutoNumeric-managed elements that are a child to the parent <form> element of this `anElement` input, to localized strings |`anElement.formUnformatLocalized();`|
220
229
|`formReformat`| Reformat all the AutoNumeric-managed elements that are a child to the parent <form> element of this `anElement` input |`anElement.formReformat();`|
221
230
231
+
### Submit the form values
232
+
233
+
Submitting the form values to the server can be done with a single AutoNumeric function call.
234
+
Moreover, the functions below may take a [callback](https://developer.mozilla.org/en-US/docs/Glossary/Callback_function), giving you more control on what to do when submitting data to the server.
235
+
222
236
The following functions can either take a callback, or not. If they don't, the default `form.submit()` function will be called.
0 commit comments