FAPI for Drupal 5.0

Notes, maybe some day it will be a full document.

  • Form ID = function that defines your form.
  • Form ID + _validate = validates on form submit.
  • Form ID + _submit = should save any data, called on submit if validate produces no errors.
  • theme_ + Form ID = called to theme your form.
  • Prefix/suffix (form id) for _validate/_sumbit/theme_ can be altered by adding $form['#base'] = 'new_prefix'; to the form definition.