function faq_general_settings_form in Frequently Asked Questions 7
Same name and namespace in other branches
- 5.2 faq.module \faq_general_settings_form()
- 5 faq.module \faq_general_settings_form()
- 6 faq.admin.inc \faq_general_settings_form()
- 7.2 faq.admin.inc \faq_general_settings_form()
Define a form to edit the page header and descriptive text.
Return value
array 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'),
);
$faq_description_default = array(
'value' => '',
'format' => filter_fallback_format(),
);
$faq_description = variable_get('faq_description', $faq_description_default);
$form['faq_description'] = array(
'#type' => 'text_format',
'#title' => t('FAQ Description'),
'#default_value' => $faq_description['value'],
'#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' => $faq_description['format'],
);
$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),
);
$form['faq_path'] = array(
'#type' => 'textfield',
'#title' => t('FAQ Path'),
'#description' => t('This option sets the path to the faq page. DO NOT append with a \'/\''),
'#default_value' => _faq_path(),
);
return system_settings_form($form);
}