Skip to main content

Writing a Module

  • Chapter
Pro Drupal 7 Development
  • 837 Accesses

Summary

After reading this chapter, you should be able to perform the following tasks:

  • Create a Drupal module from scratch.

  • Understand how to hook into Drupal’s code execution.

  • Store and retrieve module-specific settings.

  • Create and process simple forms using Drupal’s forms API.

  • Create a new administrative category on Drupal’s main administration page.

  • Define a form for the site administrator to choose options using check boxes, text input fields, and radio buttons.

  • Validate settings and present an error message if validation fails.

  • Understand how Drupal stores and retrieves settings using the built-in persistent variable system.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 49.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Authors

Editor information

Michelle Lowman Steve Anglin Mark Beckner Ewan Buckingham Gary Cornell Jonathan Gennick Jonathan Hassell Michelle Lowman Matthew Moodie Duncan Parkes Jeffrey Pepper Frank Pohlmann Douglas Pundick Ben Renow-Clarke Dominic Shakeshaft Matt Wade Tom Welsh Anita Castro Mary Ann Fugate

Rights and permissions

Reprints and permissions

Copyright information

© 2010 Todd Tomlinson and John K. VanDyk

About this chapter

Cite this chapter

Tomlinson, T., VanDyk, J.K. (2010). Writing a Module. In: Lowman, M., et al. Pro Drupal 7 Development. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-2839-4_2

Download citation

Publish with us

Policies and ethics