Preface
1:
The Elements of a Drupal Theme
2:
Theme Set Up and Configuration
3:
Working with Theme Engines
Free Chapter 4:
Style Sheets and Themeable Functions
5:
Intercepts and Overrides
6:
Modifying an Existing Theme
7:
Building a New Theme
8:
Dealing with Forms
Appendix A
Index
Free Chapter:
Chapter 3:
Working with Theme
Engines [2.1 MB]
Contact
us
|
Chapter 8:
Dealing with Forms
In this chapter, we look at the forms generated by the Drupal core and how they can be themed. This chapter covers all the default forms available on the front end of the website, including the various search, login, and contact forms, as well as the output of the Polls module. It's worth noting at the outset that this chapter is about theming forms, not creating custom forms; accordingly, the contents of this chapter are concerned with presentation not with adding or deleting form elements or creating new forms.
There are no additional files to download or install for this chapter; all examples are based on the default Garland theme. You will, however, need, access to your favorite editor to make the modifications discussed here, as well as a Drupal installation on which to preview your work.
|
Chapter
8: Dealing with Forms
- How Forms Work in Drupal
-
Modifying and Overriding Form Functions
- Adding HTML via Function Attributes
- Using form_alter()
- Overriding Form Functions from template.php
- Creating Custom Templates for Forms
- Page Templates
- Block Templates
- Templates for Forms Output
- Common Form Issues
- Modifying Data Labels and Other Text
- Using form_alter()
- Override the Function
- Create a New Template
- Add a Node
- Modifying the Styling of a Form
- Using form_alter()
- Override the Function
- Create a New Template
- Using Images for Buttons
- The Default Forms
- The User Forms
- The Login Forms
- The User Registration Form
- The Request Password Form
- The Edit User Info Form
- The Default Contact Form
- The Search Forms
- The Theme Search Form
- The Block Search Form
- The Page Search Form
- The Advanced Search Form
- The Search Results Page
- The Poll Module Forms
- The Poll Page Form
- Summary
|
|
Paperback 250 pages
Released: December 2007
ISBN: 1847191827
ISBN 13:
978-1-847191-82-3 |
|
|
|
|