function hook_field_instance_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/api.elmsln.org/includes/bootstrap.inc).
cis7 field_ui.api.php hook_field_instance_settings_form($field, $instance)
cle7 field_ui.api.php hook_field_instance_settings_form($field, $instance)
elmsmedia7 field_ui.api.php hook_field_instance_settings_form($field, $instance)
icor7 field_ui.api.php hook_field_instance_settings_form($field, $instance)
meedjum_blog7 field_ui.api.php hook_field_instance_settings_form($field, $instance)
mooc7 field_ui.api.php hook_field_instance_settings_form($field, $instance)

Add settings to an instance field settings form.

Invoked from field_ui_field_edit_form() to allow the module defining the field to add settings for a field instance.

Parameters

$field: The field structure being configured.

$instance: The instance structure being configured.

Return value

The form definition for the field instance settings.

Related topics

11 functions implement hook_field_instance_settings_form()

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

date_field_instance_settings_form in sites/all/modules/ulmus/date/date.field.inc
Implements hook_field_instance_settings_form().
entityreference_field_instance_settings_form in sites/all/modules/ulmus/entityreference/entityreference.module
Implements hook_field_instance_settings_form().
field_collection_field_instance_settings_form in sites/all/modules/ulmus/field_collection/field_collection.module
Implements hook_field_instance_settings_form().
field_hidden_field_instance_settings_form in sites/all/modules/ulmus/field_hidden/field_hidden.module
For editing a particular instance of the field (e.g. 'some_hidden' in current content type).
field_test_field_instance_settings_form in modules/field/tests/field_test.field.inc
Implements hook_field_instance_settings_form().

... See full list

1 invocation of hook_field_instance_settings_form()
field_ui_field_edit_form in modules/field_ui/field_ui.admin.inc
Form constructor for the field instance settings form.

File

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

Code

function hook_field_instance_settings_form($field, $instance) {
  $settings = $instance['settings'];

  $form['text_processing'] = array(
    '#type' => 'radios',
    '#title' => t('Text processing'),
    '#default_value' => $settings['text_processing'],
    '#options' => array(
      t('Plain text'),
      t('Filtered text (user selects text format)'),
    ),
  );
  if ($field['type'] == 'text_with_summary') {
    $form['display_summary'] = array(
      '#type' => 'select',
      '#title' => t('Display summary'),
      '#options' => array(
        t('No'),
        t('Yes'),
      ),
      '#description' => t('Display the summary to allow the user to input a summary value. Hide the summary to automatically fill it with a trimmed portion from the main post.'),
      '#default_value' => !empty($settings['display_summary']) ? $settings['display_summary'] : 0,
    );
  }

  return $form;
}