You are here

function faq_general_settings_form in Frequently Asked Questions 7.2

Same name and namespace in other branches
  1. 5.2 faq.module \faq_general_settings_form()
  2. 5 faq.module \faq_general_settings_form()
  3. 6 faq.admin.inc \faq_general_settings_form()
  4. 7 faq.admin.inc \faq_general_settings_form()

Define a form to edit the page header and descriptive text.

Return value

The general settings form code stored in the $form variable, before converted to HTML.

2 string references to 'faq_general_settings_form'
faq_menu in ./faq.module
Implements hook_menu().
faq_settings_page in ./faq.admin.inc
Generates the settings form for the FAQ module.

File

./faq.admin.inc, line 32
Administrative page callbacks for the faq module.

Code

function faq_general_settings_form($form) {
  $form['faq_title'] = array(
    '#type' => 'textfield',
    '#title' => t('Title'),
    '#default_value' => variable_get('faq_title', 'Frequently Asked Questions'),
  );
  $form['body_filter']['faq_description'] = array(
    '#type' => 'textarea',
    '#title' => t('FAQ Description'),
    '#default_value' => variable_get('faq_description', ''),
    '#description' => t('Your FAQ description.  This will be placed at the top of the page, above the questions and can serve as an introductory text.'),
    '#rows' => 5,
    '#format' => variable_get('faq_description_format', NULL),
  );
  $form['faq_custom_breadcrumbs'] = array(
    '#type' => 'checkbox',
    '#title' => t('Create custom breadcrumbs for the FAQ'),
    '#description' => t('This option set the breadcrumb path to "%home > %faqtitle > category trail".', array(
      '%home' => t('Home'),
      '%faqtitle' => variable_get('faq_title', 'Frequently Asked Questions'),
    )),
    '#default_value' => variable_get('faq_custom_breadcrumbs', TRUE),
  );
  return system_settings_form($form);
}