Updating a field
New feature in Drupal 7: formatters can declare settings and default values for those settings.New constraint in Drupal 7: two formatters cannot have the same machine name (this was already the case for field type and widget names in Drupal 6).You can also perform more complicated updates in Oracle.
There are now separate weights for the widget, and the display.In Drupal 7, fields can be on any object that declares it is 'fieldable', including nodes and users.Other modules can create their own entities that can have fields attached to them by declaring hook_entity_info(). It has the same basic structure as the $field array used in Drupal 6, but contains the settings that apply to a specific instance of a field.$element['#entity_type'] $element['#bundle'] $element['#field_name'] $element['#language'] $element['#columns'] $element['#title'] $element['#description'] $element['#required'] $element['#delta'] $element['#language'] In Drupal 7 hook_field_settings() is broken out into hook_field_settings_form() and hook_field_schema().The 'save' operation was used to instruct CCK what settings need to be saved and is no longer needed since the settings are defined in hook_field_info(). */ function myfield_field_settings_form($field, $instance, $has_data) /** * Implements the #element_validate callback for myfield_field_settings_form().