Typically in Single Page Frameworks (SPA) such as Angular, forms are not used to automatically submit data to the server, because input fields are bound to properties of JavaScript objects that are sent in JSON format to the server through AJAX operations. However, forms still remain useful for the functionalities listed in the following points 1 and 2. Input fields are validated in the context of all other input fields contained in the same form, and further processing of the form data may proceed only if the form is valid, that is, if all input fields contained in the form are valid.
HTML forms have three connected purposes:
- Grouping input fields that contribute to the same update operation.
- Providing a context for validation. In fact, in general, validation rules may involve several input fields belonging to the same logical update operation.
- Triggering an automatic...