Last updated 11 November 2011. Created on 5 December 2008.
Edited by firebus, Scyther, sharplesa, ghosts. Log in to edit this page.

These are the defined callback functions which CCK will call. They are similar to Drupal's core hooks, but not part of that set. They follow the same naming convention, that is, if your module is named foo and defines a CCK field, then the hook_field function would be named foo_field().

Required CCK hooks for CCK fields

  • hook_field_info - To define new field type(s) in your module, use hook_field_info to tell CCK about those types.

    For example, number.module defines number_integer, number_decimal, and number_float. And text.module simply defines text.

  • hook_field_formatter_info

Required CCK hooks for CCK widgets

Optional CCK hooks

Looking for support? Visit the forums, or join #drupal-support in IRC.