You are here

function custom_formatters_settings_form in Custom Formatters 6

Same name and namespace in other branches
  1. 7.2 includes/custom_formatters.admin.inc \custom_formatters_settings_form()

Custom Formatters settings form.

1 string reference to 'custom_formatters_settings_form'
custom_formatters_menu in ./custom_formatters.module
Implements hook_menu().

File

./custom_formatters.admin.inc, line 1075
Contains administration functions for the Custom Formatters module.

Code

function custom_formatters_settings_form($form_state) {
  $form = array();
  $settings = variable_get('custom_formatters_settings', array(
    'label_prefix' => TRUE,
    'label_prefix_value' => t('Custom'),
  ));
  $form['settings'] = array(
    '#tree' => TRUE,
  );
  $form['settings']['label_prefix'] = array(
    '#type' => 'checkbox',
    '#title' => t('Use Label prefix?'),
    '#description' => t('If checked, all Custom Formatters labels will be prefixed with a set value.'),
    '#default_value' => $settings['label_prefix'],
  );
  $form['settings']['label_prefix_value'] = array(
    '#type' => 'textfield',
    '#title' => t('Label prefix'),
    '#default_value' => $settings['label_prefix_value'],
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Save'),
  );
  return $form;
}