- Introduction
- Installation
- Field Descriptions
- Suggestions
- Current Maintainers
This module adds a Customer node type with assocaited fields. Fields will be described below. It adds Customer page to the menu, and displays all Customer nodes in node post date order. The Customer page displays nodes as Teasers. This will allow for modules such as Display Suite to easily change the display by modifying the Teaser. It could also be replaced by Views using the Fields, the Teaser view mode, or anything else that was desired.
Install as you would normally install a contributed Drupal module. See: https://drupal.org/documentation/install/modules-themes/modules-7 for further information.
It has six module dependencies
The Tschet Customer moodule uses five custom fields.
Customer Name
A Name field, allowing for entry of separate values for title,
Given name, Middle name, Family name, Generational value, and Credentials. This
allows for a wide range of display options and sorting. This field is being
used to generate the Node Title value using hook_node_presave. The default node
title field is disabled by use of a hook_form_BASE_FORM_ID_alter.
Date of Birth
A Date field, collecting a single date value of Year, Month, Day. This is
displayed in a custom date format installed with hook_date_format_types. The
format is also added with variable_set so that the Date format is immediately
available.
Address
A Location CCK field collectign a single address. The field collects locaiton
name, address, additional address line, city, state, ZIP, and country.
Longitude and Latitude are disabled since mapping was not planned for at this
time. That feature could easily be added later. Location Email and Phone modules
were not used as they do not validate well, and those values are often used
outside the scope of the address field. I also add a custom location.tpl.php
using hook_theme_registry_alter for the address display, as the default
template displays addresses in a non-conventional format.
Customer Email
An Email field with full validation and display options. Collects a single email
value.
Customer Phone
An Phone field with full validation and display options. Collects a single phone
number. Currently validates numbers based on USA and Canada number formats, but
other formats are available.
This code was testing with IDE (PHPStorm) specific code validation tools as well as with Code Sniffer validating against the Drupal coding standard. Dsiplay was tested with a variety of browsers using manually entered content as well as bulk generated content. Installation was tested multiple times on several Drupal installations.
- The Views module would add signficantly more control over the Customer page displays.
- Usage of the Location module could easily be expanded to include mapping capability.
- A Taxonomy could be added for additional Customer sorting functionality.
- Douglas Tschetter (tschet) - https://www.drupal.org/u/tschet