Change record status: 
Introduced in branch: 
7.x, 8.x
Introduced in version: 

Probably the biggest consumer of Field API is the Entity system. It always has to deal with "sets of fields": for all fields attached to an entity, forms (widgets) need to be generated, all fields in that form need to be validated, submitted, and so on.

However, there is also a valid use case for being able to operate on a single field (instance of an entity): when you want to generate forms to be able to edit a single field of an entity. That's what the FAPE module in Drupal 7 provides and what Edit offers in-place (on the front-end): editing of single fields in fast, small, simple forms.

E.g. field_view_field() already supported this ability to operate on a single field only.

This change record is about the changes necessary to accomodate that, so that modules in need of this functionality don't have to duplicate hundreds of lines of code and potentially break e.g. form alterations. 99% of Drupal developers won't need this.

Note that this was already supported in Field API's internal API (in field_invoke_method()). All that has changed, is exposing that function's $options parameter as an optional parameter in the following public API functions:

  • field_attach_form()
  • field_attach_validate()
  • field_attach_form_validate()
  • field_attach_submit()

All of these functions now call field_invoke_method() with an $options parameter, which is also documented on that same function.

Module developers
Updates Done (doc team, etc.)
Online documentation: 
Not done
Theming guide: 
Not done
Module developer documentation: 
Not done
Examples project: 
Not done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Not done