Version 1.10 (checked in on 2010/12/26 at 21:45:54 by ilo)
This is the Form API Tutorial from the handbook. TODO: Update this URL, and update it in the dynamic text below.
It goes through nine form examples in increasing complexity to demonstrate Drupal 7 Form API.
Links are provided inline for the related handbook pages.
| Name | Description |
|---|---|
| form_example_tutorial | Main Form tutorial page. |
| form_example_tutorial_1 | This first form function is from the Form Tutorial handbook page |
| form_example_tutorial_10 | Example 10: A form with a file upload field. |
| form_example_tutorial_10_submit | Submit handler for form_example_tutorial_10(). |
| form_example_tutorial_10_validate | Validate handler for form_example_tutorial_10(). |
| form_example_tutorial_2 | This is Example 2, a basic form with a submit button. |
| form_example_tutorial_3 | Example 3: A basic form with fieldsets. |
| form_example_tutorial_4 | Example 4: Basic form with required fields. |
| form_example_tutorial_5 | Example 5: Basic form with additional element attributes. |
| form_example_tutorial_6 | Example 6: A basic form with a validate handler. |
| form_example_tutorial_6_validate | Now we add a handler/function to validate the data entered into the "year of birth" field to make sure it's between the values of 1900 and 2000. If not, it displays an error. The value report is $form_state['values'] (see… |
| form_example_tutorial_7 | Example 7: With a submit handler. |
| form_example_tutorial_7_submit | Submit function for form_example_tutorial_7(). |
| form_example_tutorial_7_validate | Validation function for form_example_tutorial_7(). |
| form_example_tutorial_8 | Example 8: A simple multistep form with a Next and a Back button. |
| form_example_tutorial_8_next_submit | Submit handler for form_example_tutorial_8() next button. |
| form_example_tutorial_8_next_validate | Validate handler for the next button on first page. |
| form_example_tutorial_8_page_two | Returns the form for the second page of form_example_tutorial_8(). |
| form_example_tutorial_8_page_two_back | Back button handler submit handler. |
| form_example_tutorial_8_page_two_submit | The page 2 submit handler. |
| form_example_tutorial_9 | Example 9: A form with a dynamically added new fields. |
| form_example_tutorial_9_add_name | Submit handler for "Add another name" button on form_example_tutorial_9(). |
| form_example_tutorial_9_remove_name | |
| form_example_tutorial_9_submit | Submit function for form_example_tutorial_9(). |
| form_example_tutorial_9_validate | Validate function for form_example_tutorial_9(). |