You are here

function name_field_diff_options_form in Name Field 7

Provide a form for setting the field comparison options.

File

./name.diff.inc, line 41
Provide diff field functions for the Name Field module.

Code

function name_field_diff_options_form($field_type, $settings) {
  $options_form = array();
  $formats = array(
    'default' => t('Default'),
  ) + name_get_custom_format_options();
  $options_form['format'] = array(
    '#type' => 'select',
    '#title' => t('Name format'),
    '#default_value' => $settings['format'],
    '#options' => $formats,
    '#required' => TRUE,
  );
  $options_form['output'] = array(
    '#type' => 'radios',
    '#title' => t('Output'),
    '#default_value' => $settings['output'],
    '#options' => _name_formatter_output_options(),
    '#description' => t('This option provides additional options for rendering the field.'),
    '#required' => TRUE,
  );
  return $options_form;
}