function hook_field_settings_form


Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/
cis7 field_ui.api.php hook_field_settings_form($field, $instance, $has_data)
cle7 field_ui.api.php hook_field_settings_form($field, $instance, $has_data)
elmsmedia7 field_ui.api.php hook_field_settings_form($field, $instance, $has_data)
icor7 field_ui.api.php hook_field_settings_form($field, $instance, $has_data)
meedjum_blog7 field_ui.api.php hook_field_settings_form($field, $instance, $has_data)
mooc7 field_ui.api.php hook_field_settings_form($field, $instance, $has_data)

Add settings to a field settings form.

Invoked from field_ui_field_settings_form() to allow the module defining the field to add global settings (i.e. settings that do not depend on the bundle or instance) to the field settings form. If the field already has data, only include settings that are safe to change.

@todo: Only the field type module knows which settings will affect the field's schema, but only the field storage module knows what schema changes are permitted once a field already has data. Probably we need an easy way for a field type module to ask whether an update to a new schema will be allowed without having to build up a fake $prior_field structure for hook_field_update_forbid().


$field: The field structure being configured.

$instance: The instance structure being configured.

$has_data: TRUE if the field already has data, FALSE if not.

Return value

The form definition for the field settings.

Related topics

21 functions implement hook_field_settings_form()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

better_formats_field_settings_form in sites/all/modules/ulmus/better_formats/better_formats.module
Build the settings form for Field API fields.
date_field_settings_form in sites/all/modules/ulmus/date/
Implements hook_field_settings_form().
ds_disable_layout_field_settings_form in sites/all/modules/ulmus/ds/includes/
Menu callback: Disable layout and field settings form.
ds_ds_field_settings_form in sites/all/modules/ulmus/ds/includes/
Implements hook_ds_field_settings_form().
ds_enable_layout_field_settings_form in sites/all/modules/ulmus/ds/includes/
Menu callback: Enable layout and field settings form.

... See full list

2 invocations of hook_field_settings_form()
field_ui_field_edit_form in modules/field_ui/
Form constructor for the field instance settings form.
field_ui_field_settings_form in modules/field_ui/
Form constructor for the field settings edit page.


modules/field_ui/field_ui.api.php, line 38
Hooks provided by the Field UI module.


function hook_field_settings_form($field, $instance, $has_data) {
  $settings = $field['settings'];
  $form['max_length'] = array(
    '#type' => 'textfield',
    '#title' => t('Maximum length'),
    '#default_value' => $settings['max_length'],
    '#required' => FALSE,
    '#element_validate' => array('element_validate_integer_positive'),
    '#description' => t('The maximum length of the field in characters. Leave blank for an unlimited size.'),
  return $form;