You are here

function name_admin_settings_form in Name Field 6

Same name and namespace in other branches
  1. 7 name.admin.inc \name_admin_settings_form()

Form builder function for module settings.

1 string reference to 'name_admin_settings_form'
name_menu in ./name.module
Implementation of hook_menu().

File

./name.admin.inc, line 11
General administration functions.

Code

function name_admin_settings_form() {
  $form['name_settings'] = array(
    '#tree' => TRUE,
  );
  $settings = name_settings();
  $form['name_settings']['default_format'] = array(
    '#type' => 'textfield',
    '#title' => t('Default name format'),
    '#default_value' => $settings['default_format'],
    '#description' => t('See help on drupal.org for more info.'),
  );
  $form['name_settings']['sep1'] = array(
    '#type' => 'textfield',
    '#title' => t('Separator 1 replacement token'),
    '#default_value' => $settings['sep1'],
  );
  $form['name_settings']['sep2'] = array(
    '#type' => 'textfield',
    '#title' => t('Separator 2 replacement token'),
    '#default_value' => $settings['sep2'],
  );
  $form['name_settings']['sep3'] = array(
    '#type' => 'textfield',
    '#title' => t('Separator 3 replacement token'),
    '#default_value' => $settings['sep3'],
  );

  // As the fieldset does not have the #input flag, this is not saved.
  $form['name_format_help'] = _name_get_name_format_help_form();
  return system_settings_form($form);
}