You are here

function faq_general_settings_form in Frequently Asked Questions 5.2

Same name and namespace in other branches
  1. 5 faq.module \faq_general_settings_form()
  2. 6 faq.admin.inc \faq_general_settings_form()
  3. 7.2 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
Implementation of hook_menu().
faq_settings_page in ./faq.module
Generates the settings form for the FAQ module.

File

./faq.module, line 341
The FAQ module allows users to create a FAQ page, with questions and answers displayed in different styles, according to the settings.

Code

function faq_general_settings_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,
  );
  $form['body_filter']['faq_description_format'] = filter_form(variable_get('faq_description_format', ''), NULL, array(
    'faq_description_format',
  ));
  return system_settings_form($form);
}