Drupal 6 FormAPI Presentation

2,480 views

Published on

Drupal Camp LA 2008 Drupal 6.x FormAPI presentation by Blake Lucchesi of www.boldsource.com

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
2,480
On SlideShare
0
From Embeds
0
Number of Embeds
16
Actions
Shares
0
Downloads
56
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Drupal 6 FormAPI Presentation

  1. 1. Drupal Forms by Blake Lucchesi
  2. 2. FormAPI Intro Forms are defined by a single php array. Each key of the array is a form element. Drupal builds and generates the html output for the form using this FormAPI.
  3. 3. Why a FormAPI? Provide a standardized means to create, process, and theme forms. Provides safe form error handling and validation. Allow other code (modules) to modify forms.
  4. 4. Building a form Step 1: Define a new function that builds and returns a form array. Step 2 (optional): Define a function that validates the form values. Step 3: Define a function that process the form values on submit. Step 4: Call the form function using drupal_get_form() to present the form on a page.
  5. 5. Basic Form

×