This page is archived
We're keeping this page up as a courtesy to folks who may need to refer to old instructions. We don't plan to update this page.
Create an administration form to save information about how the movie importer works by using variables.
Goal
Create an administrative configuration form and use those values in variables with a custom module.
Prerequisites
You will need the following knowledge and skills. If you need a review, check out the Additional resources section at the bottom of this page.
- Create administration forms to set variables within Drupal.
- Use variables where appropriate within custom modules.
Tasks
Create a menu hook to load an administration form. The form should be in a new file that has the sole purpose of containing the definition of a configuration form.
Recap
- Forms are often used to manage configuration settings for modules, and are often kept separate from the main functionality of a module.
- Update hooks are used to manage changes in configuration.
Further your understanding
- Continue to the next lesson: Movie Project: Add User Permissions.
Additional resources
- API Documentation: Form API (api.drupal.org)
- Video: Creating a Configuration Settings Form for Your Module (Drupalize.Me)