|
| 1 | +<?php |
| 2 | + |
| 3 | +/** |
| 4 | + * @file |
| 5 | + * Example forms using the Forms API. |
| 6 | + */ |
| 7 | + |
| 8 | +/** |
| 9 | + * @defgroup fapi_example Example: Forms API |
| 10 | + * @ingroup examples |
| 11 | + * @{ |
| 12 | + * Examples using Forms API. |
| 13 | + * |
| 14 | + * Creating A Drupal Form requires: |
| 15 | + * - Creating a class that extends \Drupal\Core\Form\FormBase or |
| 16 | + * \Drupal\Core\Form\ConfigFormBase |
| 17 | + * - \Drupal\fapi_example\Form\SimpleForm |
| 18 | + * - Register the route to the form or invoke using |
| 19 | + * \Drupal::formBuilder()->getForm() |
| 20 | + * - fapi_example.routing.yml |
| 21 | + * |
| 22 | + * In addition to the simple example described above this module provides |
| 23 | + * examples that demonstrate: |
| 24 | + * - The order of execution of form controller methods |
| 25 | + * - \Drupal\fapi_example\Form\BuildDemo |
| 26 | + * - Populating a portion on a form with Ajax callbacks |
| 27 | + * - \Drupal\fapi_example\Form\AjaxDemo |
| 28 | + * - Container elements used to group items |
| 29 | + * - \Drupal\fapi_example\Form\ContainerDemo |
| 30 | + * - Elements used for data input |
| 31 | + * - \Drupal\fapi_example\Form\InputDemo |
| 32 | + * - Modal form creation |
| 33 | + * - \Drupal\fapi_example\Controller\Page |
| 34 | + * - \Drupal\fapi_example\Form\ModalForm |
| 35 | + * - Hiding elements based on the state of other elements |
| 36 | + * - \Drupal\fapi_example\Form\StateDemo |
| 37 | + * - Vertical Tabs elements in forms |
| 38 | + * - \Drupal\fapi_example\Form\VerticalTabsDemo |
| 39 | + * |
| 40 | + * @} End of "defgroup field_example". |
| 41 | + */ |
0 commit comments