Introducing form API
Submitted by Johan Falk on Tue, 01/17/2012 - 16:07
Form API is one of the most important APIs when working with Drupal. It is used to build forms in a standardized and secure way, and will save you loads of time. This screencast shows an example implementation of form API, to build a text area and a submit button. In particular, this screencast includes:
- Using the drupal_get_form function as callback for a menu item
- Providing a form ID to drupal_get_form (and doing this with an array rather than a flat string)
- Using the t() function, and why that is a good idea
- The form API reference, found at http://api.drupal.org/api/drupal/developer--topics--forms_api_reference.html
Additional Resources:
Leave a comment