You are here

function redhen_fields_field_settings_form in RedHen CRM 7

Implements hook_field_settings_form().

File

modules/redhen_fields/redhen_fields.module, line 103
Defines email, phone and address field types for RedHen CRM.

Code

function redhen_fields_field_settings_form($field, $instance, $has_data) {
  $settings = $field['settings'];
  $form = array();
  if ($field['type'] == 'redhen_email') {
    $form['labels'] = array(
      '#type' => 'textarea',
      '#rows' => 10,
      '#title' => t('Labels'),
      '#default_value' => redhen_fields_allowed_labels_string($settings['labels']),
      '#required' => FALSE,
      '#description' => t('The possible labels for values in this field. Enter one value per line, in the format key|label. Key must be an integer.'),
      '#element_validate' => array(
        'redhen_fields_allowed_labels_setting_validate',
      ),
      '#field_has_data' => $has_data,
      '#field' => $field,
    );
  }
  return $form;
}