Fields are the building blocks of Drupal's powerful content modeling system. The Field API allows for the development of custom field types, field widgets, and field formatters to suit almost any data display and collection needs. When combined with entities, which allows for the attachment of fields to entity bundles (commonly known as content types), Drupal becomes infinitely flexible without requiring writing any code.
- Understand how the main components of Drupal's field system fit together
- Learn how fields can be used to customize your site
- Customize existing fields and create new additional functionality within your own modules
At this point in the development cycle, the Field API is stable. Contributed modules that provide additional field types and add functionality to the field system are likely to emerge, but the main components of the core functionality are unlikely to change.
Fields for site builders
Field API for developers
Fields and Entities are closely related concepts. It is best to learn both.
FieldTypes, FieldWidgets, and FieldFormatters (Drupal.org)
- Overview of field types, widgets, and formatters for developers. Includes a handy list of all field types in Drupal core
- Field API Documentation (api.drupal.org)
Field Types API Documentation (api.drupal.org)
- Together these two links constitute the main API documentation pages for the Field and Field Types APIs. The other pages linked to from here, including the widget and formatter APIs, cover the bulk of the functionality behind Drupal's field system.
Creating a custom Field (Drupal.org)
- This tutorial, along with others in progress from drupal.org, walks through the process of creating a custom field.
Examples for Developers (Drupal.org)
- The Examples project contains an example module (field_api) with sample code demonstrating adding a new field type, widget, and formatter.