Skip to main content
Added a link to drupal documentation for hook_form_submit
Source Link

Drupal Hooks are a call back mechanism, you name your function modulename_Hook like mymodule_form_alter(). Based on the name of the function, it is called in the proper phase of the Drupal execution. This is an entry point from Drupal into your module.

Using Drupal Hooks doesn't change that much from version to version, the hooks that are available do change from version to version. The old tutorials are still good. The best way to learn how to use hooks is to examine existing contributed modules, or that's what worked for me. Hooks you really need to learn, or that you should start with are the FORM API hooks hook_form_alter, hook_form, hook_form_validate (https://api.drupal.org/api/drupal/includes!form.inc/function/drupal_form_submit/7), ..., hook_menu is generally needed if you're adding a page to the website.

If you can get a versioncopy of "Pro Drupal Development" or "Pro Drupal 7 Development" (http://www.drupalbook.com/ or http://www.amazon.com/Drupal-Development-Experts-Voice-Source/dp/1430228385) it might help as well. Go with the pdf downloads. There are also 2 or 3 day classes you can take, or you can get training at your local Drupal Camp or Drupal convention. The answer to your question is non-trivial and probably beyond the scope of what I can put here.

Using Drupal Hooks doesn't change that much from version to version, the hooks that are available do change from version to version. The old tutorials are still good. The best way to learn how to use hooks is to examine existing contributed modules, or that's what worked for me. Hooks you really need to learn, or that you should start with are the FORM API hooks hook_form_alter, hook_form, hook_form_validate. If you can get a version "Pro Drupal Development" or "Pro Drupal 7 Development" (http://www.drupalbook.com/ or http://www.amazon.com/Drupal-Development-Experts-Voice-Source/dp/1430228385) it might help as well. Go with the pdf downloads. There are also 2 or 3 day classes you can take, or you can get training at your local Drupal Camp or Drupal convention. The answer to your question is non-trivial and probably beyond the scope of what I can put here.

Drupal Hooks are a call back mechanism, you name your function modulename_Hook like mymodule_form_alter(). Based on the name of the function, it is called in the proper phase of the Drupal execution. This is an entry point from Drupal into your module.

Using Drupal Hooks doesn't change that much from version to version, the hooks that are available do change from version to version. The old tutorials are still good. The best way to learn how to use hooks is to examine existing contributed modules, or that's what worked for me. Hooks you really need to learn, or that you should start with are the FORM API hooks hook_form_alter, hook_form, hook_form_validate (https://api.drupal.org/api/drupal/includes!form.inc/function/drupal_form_submit/7), ..., hook_menu is generally needed if you're adding a page to the website.

If you can get a copy of "Pro Drupal Development" or "Pro Drupal 7 Development" (http://www.drupalbook.com/ or http://www.amazon.com/Drupal-Development-Experts-Voice-Source/dp/1430228385) it might help as well. Go with the pdf downloads. There are also 2 or 3 day classes you can take, or you can get training at your local Drupal Camp or Drupal convention.

Source Link

Using Drupal Hooks doesn't change that much from version to version, the hooks that are available do change from version to version. The old tutorials are still good. The best way to learn how to use hooks is to examine existing contributed modules, or that's what worked for me. Hooks you really need to learn, or that you should start with are the FORM API hooks hook_form_alter, hook_form, hook_form_validate. If you can get a version "Pro Drupal Development" or "Pro Drupal 7 Development" (http://www.drupalbook.com/ or http://www.amazon.com/Drupal-Development-Experts-Voice-Source/dp/1430228385) it might help as well. Go with the pdf downloads. There are also 2 or 3 day classes you can take, or you can get training at your local Drupal Camp or Drupal convention. The answer to your question is non-trivial and probably beyond the scope of what I can put here.