Creating a configuration settings form for your module

Video loading...

Join Drupalize.Me to watch this video

Join today and gain instant access to our entire video library.

Log in Sign up
  • 0:08
    In the previous chapter, we discussed hook_form_alters.
  • 0:11
    And in the example, we altered a form to make sure users did not use the password,
  • 0:16
    password, 12345, or love, and it was a hard-coded array that we created.
  • 0:21
    And in this chapter, instead of using a hard-coded array,
  • 0:25
    we actually want to make a configuration form
  • 0:28
    so administrators can add to, augment, or change that list.
  • 0:33
    A system settings form, when you click admin, will show up there in the list,
  • 0:37
    of all possible things an administrator can do on your site.
  • 0:41
    So to get started, we actually need to first create a page for these.
  • 0:47
    So I'm going to go into my code,

Module Development for Drupal 7

Loading ...

Creating a Configuration Settings Form for Your Module


This video goes through the process of creating a configuration form in order to save settings to the variables table in the database, and how to integrate those variables into your module.

Log in or sign up to download companion files.
Additional resources: 

Average review

Average: 4 (1 vote)



We don't see the form_set_error message!
You should add a 'Comment' tab next to 'Reviews'