function mpac_form_menu_link_form_alter in Multi-path autocomplete 8
Implements hook_form_FORM_ID_alter().
File
- ./
mpac.module, line 62 - Find node paths on menu item creation via autocomplete.
Code
function mpac_form_menu_link_form_alter(&$form, $form_state) {
if (empty($form['link_path']['#autocomplete_path'])) {
$form['link_path']['#autocomplete_route_name'] = 'mpac.autocomplete';
$form['link_path']['#autocomplete_route_parameters'] = array(
'type' => 'path',
);
$form['link_path']['#description'] .= '<br />' . t('To get a list of items allowed here you may simply enter the title of previously created content or a part of the path to the content.');
}
}