You are here

function text_field_instance_settings_form in Drupal 7

Implements hook_field_instance_settings_form().

File

modules/field/modules/text/text.module, line 87
Defines simple text field types.

Code

function text_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' => 'checkbox',
      '#title' => t('Summary input'),
      '#default_value' => $settings['display_summary'],
      '#description' => t('This allows authors to input an explicit summary, to be displayed instead of the automatically trimmed text when using the "Summary or trimmed" display type.'),
    );
  }
  return $form;
}