How can I add a custom form menu link to the administrative menu programmatically?

I am trying to add this form as admin menu link like content, structure and module.


Create a new menu using hook_menu. Like this

$items['admin/config/my_form'] = array(
    'title' => 'My Form',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('form_id'),
    'access callback' => TRUE, // Give access as per your need.
    'type' => MENU_NORMAL_ITEM,

Using this your form will be created with the link / menu item under configuration menu.


|improve this answer|||||

Not the answer you're looking for? Browse other questions tagged or ask your own question.