This module allows site administrators to add classes to the outer HTML wrapper for any field display.
Classes can be specified at the Manage display settings for content types, users and other entities.
The field formatter class settings are found in the Manage display tab for content types, users, and other entities. A text box is available for each field's class, revealed by using the formatter settings edit button (Gear wheel icon) for that field.
The class is added to the outer
<div> container for the field. The default Drupal field classes (e.g. "field-type-taxonomy-term-reference") remain available - this module does not remove any classes.
The accompanying screenshot images show the settings form and some example HTML output.
Shane Thomas has produced a great screencast which demonstrates how to use this module. Check out Episode 82 of the Daily Dose of Drupal blog.
Field formatter settings API (7.x version only)
Drupal 7: Field formatter class is now feature-complete. Future development for D7 will be limited to bug fixes and/or security issues.
Drupal 8: An alpha port is available for testing.
There is a compatibility problem when using this module in combination with the extra fields provided by Display suite. The issue potentially affects all modules which implement Field Formatter Settings API, and a solution is being explored in the Display suite project.