Warning message

Documentation is currently being migrated into the new system. Some pages might be temporarily missing, and some guides might appear empty. Thank you for your patience while we are improving Drupal.org documentation.

Field API

Documentation for Field API in Drupal 7.

Field API glossary

Adding and reusing a field

Let's begin with creating a last name field. We will add this to users and to the 'picture' node type so that it's possible to put names on

Field API tutorial

In previous Drupal versions, most modules defined their own tables, handled writing and reading data from tables, managed data entry and

Field Types and Settings

There are a defined number of field types in use, and each type has its own available settings (links below are to API HOOK_field_info()

How to create a new entity type

Entities are a bit like objects in OOP in that they are collections of data that Drupal can operate on in consistent manner. It might be

Implementing entity revisioning

Entity revisioning is fairly simple - most of it is handled by field API, so you just need to implement a revision table, and appropriate

Making an entity fieldable

There are a number of hooks involved in making an entity fieldable. hook_entity_info provides the info (surprise!):

Implementing the field management UI

The field_ui module has a built in field management system for your entity bundles. Enabling this system for your entity is a relatively

Language support for entity fields

About multilingual fields