Contacts

eMailEvery website needs a contact form. Depending on the provider of the website sometimes you may need only one, sometimes more of these forms. If it is a website for a company with more than one department, they may want to have a contact form for every department. Perhaps you would like to display a contact form for every employee or every user account.

All of this can be done by using the Joomla! contact component.

As we have already seen (see chapter Contact form), it's quite easy to set up a simple contact form. Simply create a contact, assign it to a category and create a menu item.

Example

If several contact forms are needed, you should think about the underlying structure. Similar to article categories, it is possible to assign contact categories to menu items. As a result, you will see a list of contacts assigned to that category. If you click on the name or the title of these contacts, you will see more details and the form itself.

I have tried different scenarios with the contact component and the possibilities are amazing! As everywhere in Joomla! 1.6 you have the option to create nested categories and different menu item types. In options (Components Contact Options), you can, for example, configure the appearance of the contact form (Slider, Tab, no formatting) and set an impressive number of other parameters.

As an example I have created a contact area for our company with three contact forms for different kinds of inquiries and a contact form for each team member. By clicking on the links, the contact form and additional details will appear (Figure 1).

Joomla! 1.6 cocoate.com/node/6230/
Joomla! 2.5 cocoate.com/node/10316

Figure 1: Contact area

For this example, I have created two categories: cocoate and team. The team category is a sub category of cocoate. It would have been possible to add an image and a description but I have decided to fill the title field only (Figure 2).

Joomla! 1.6 cocoate.com/node/6230/
Joomla! 2.5 cocoate.com/node/10316

Figure 2: Contact categories

For each contact form I need a contact with an email address. Contacts can be assigned to users or stand alone. In this case, I have created three stand alone contacts related to the cocoate category without linking them to a user. I have also created two contacts related to the team category and additionally related to an existing user account (Figure 3).

Joomla! 1.6 cocoate.com/node/6230/
Joomla! 2.5 cocoate.com/node/10316

Figure 3: Contacts

If any of the data changes, such as a phone number, for example, it would be nice for related users to be able to make these changes directly from their user profile on the website without having to access the administrator area. For this task Joomla! provides the User-Profile plug-in. You just have to activate it in Extensions Plug-ins. In the user profile, a new area is displayed for the profile fields, which is connected to the contact component.