1 field_test.field.inc field_test_field_settings_form($field, $instance, $has_data)

Implements hook_field_settings_form().

File

core/modules/field/tests/field_test/field_test.field.inc, line 133
Defines a field type and its formatters and widgets.

Code

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

  // Return no settings if so set to test skipping the field settings
  // form step when adding new fields.
  if (state_get('field_ui_test_field_settings', TRUE) === FALSE) {
    return array();
  }

  $form['test_field_setting'] = array(
    '#type' => 'textfield',
    '#title' => t('Field test field setting'),
    '#default_value' => $settings['test_field_setting'],
    '#required' => FALSE,
    '#description' => t('A dummy form element to simulate field setting.'),
  );

  return $form;
}