Module Development

Field API Hooks for Drupal 8, 9, and 10

Drupal's Field API specifies the implementation details for field types, widgets and formatters. It also provides several hooks that allow custom code to alter these implementation details. In this tutorial we'll take a look at these Field API hooks and see how they can be used to change field types, widgets and formatters.

By the end of this lesson, you should be able to:

  • Idenfity existing Field API hooks for manipulating field behavior
  • Understand the proper method for changing the behavior of a field type, widget or formatter
  • Know where to find the documentation for these API functions, and how to find their implementations

Drupal Module Development