Drupal – 7 : Make a Module with a Form and Menu Link

Created a simple form which will add to your website that is accessed through its own custom URL.

Hooks are functions with special names that will be called by Drupal when actions occur.

For example – “form_example_menu()” is called when menu information is gathered.

Function t() will output text and is a Drupal function that plays nice with translation.

This demo will help you to create a new module with menu hook function.

After completing all the steps, go to the /admin/modules section and enable this module.

Clear all caches from the /admin/config/development/performance section.

Your page url will be “form_example”

Demo – Creating Module Structure


Step – 1

Step – 2

form_example.info (The .info file contains information about what your module does)

form_example.module (The .module file contains the actual code including hooks)

2 Responses to Drupal – 7 : Make a Module with a Form and Menu Link

  1. casey says:

    .

    thanks for information.

Leave a Reply

Your email address will not be published. Required fields are marked *