function nice_menus_form_alter in Nice Menus 6
Same name and namespace in other branches
- 5 nice_menus.module \nice_menus_form_alter()
- 6.2 nice_menus.module \nice_menus_form_alter()
- 7.3 nice_menus.module \nice_menus_form_alter()
- 7.2 nice_menus.module \nice_menus_form_alter()
Implementation of hook_form_alter().
File
- ./
nice_menus.module, line 29 - Module to enable CSS dropdown and flyout menus.
Code
function nice_menus_form_alter(&$form, $form_state, $form_id) {
switch ($form_id) {
case 'system_theme_settings':
// This is a global setting, so only insert the field
// on the global settings page.
if (arg(4)) {
return;
}
// Have to add a custom submit handler since this form doesn't use
// the standard system submit handler.
$form['#submit'][] = 'nice_menus_system_theme_settings_submit';
// Add global theme setting for a custom CSS file.
$form['nice_menus_custom_css'] = array(
'#type' => 'textfield',
'#title' => t('Path to custom Nice Menus CSS file'),
'#description' => t('To override the default Nice Menus CSS layout, enter the path to your custom CSS file. It should be a relative path from the root of your Drupal install (e.g. sites/all/themes/example/mymenu.css).'),
'#default_value' => variable_get('nice_menus_custom_css', ''),
// Field appears below submit buttons without this -- yucky.
'#weight' => 0,
);
break;
}
}