function mpac_form_menu_edit_item_alter in Multi-path autocomplete 6
Same name and namespace in other branches
- 7 mpac.module \mpac_form_menu_edit_item_alter()
Implement hook_form_FORM_ID_alter().
Change path field to autocomplete field.
File
- ./
mpac.module, line 65 - Find node paths on menu item creation via autocomplete.
Code
function mpac_form_menu_edit_item_alter(&$form, &$form_state) {
$form['menu']['link_path']['#autocomplete_path'] = 'mpac/autocomplete';
$form['menu']['link_path']['#description'] .= '<br />' . t("You may enter the title of the node you'd like to link to to get a list of all possible matches.");
if (module_exists('path')) {
$form['menu']['link_path']['#description'] .= ' ' . t('Matches marked with %marker are URL aliases.', array(
'%marker' => t('*'),
));
}
}