In this chapter, we will explore the various recipes to work with forms in Drupal:
Drupal provides a robust API for creating and managing forms without writing any HTML. Drupal handles form building, validation, and submission. Drupal handles the request to either build the form or process the HTTP POST request. This allows developers to simply define the elements in a form, provide any additional validation if needed, and then handle a successful submission through specific methods.
This chapter contains various recipes to work with forms in Drupal through the Form API. In Drupal 8, forms and form states are objects.