top

The contact form

CMSimple_XH provides a simple form that allows visitors to contact us via email.

Activation

To activate the e-mail form, the system must be provided with a valid e-mail address to which the message should be sent (recipient address). If this information is missing, then CMSimple_XH can of course not offer a form. The corresponding input option can be found under:

Admin menuSettingsConfigurationMailform : Email:

Directly under this setting you can additionally activate a simple CAPTCHA for the form, which is simple but effective against robots according to experience.

Calling in the template

The contact form is usually called by a link placed in the template. Many templates already contain such a link:

<?php echo mailformlink();?>

Or shorter:

<?=mailformlink()?>

This link leads to a page dynamically generated by CMSimple_XH with headline and form, which cannot be changed further.

Calling in the content of a page

If you want to have the contact form on a separate, self-designed page that also appears in the navigation menu, then the form must be called not in the template, but in the content of the desired page. Like this:

{{{XH_mailform}}}

The form then appears exactly where the call is. This offers more design options and even works in Newsboxes.

Technique and issues

The contact form uses the mail() function of PHP to send the email. On most web servers, this works without any further setup. However, some servers could use some help, so it is recommended that you test the contact form yourself. If necessary, ask the server administrator or provider to make the necessary settings. Failed mail attempts are logged in the log file /cmsimple/log.txt. You should check it from time to time.

 

There are known issues regarding faulty Mail Transfer Agents (MTA) that do not handle line endings properly. The result is that the email content contains lines that don’t belong there, usually starting with “From: …”; the rest of the content is then an unintelligible jumble of characters. To fix this, you can try the following. Activate the checkbox under:

Admin menuSettingsConfigurationMore…Mailform : Lf only

Note that only one contact form is possible on the same page. If there are more, only one form will be displayed at a time.

Design and labeling

The appearance of the form can be influenced via CSS rules in your own template stylesheets. Which ones are available can be found out via the developer tools (browser console).

The labels and headings can also be changed (also language-dependent), under:

Admin menuSettingsLanguageMailform :

Alternatives

It is possible to use other external plugins as contact forms.

For example, a very flexible plugin for forms is Advancedform_XH. This plugin can simply replace the native contact form with more options – but is also suitable for designing very complex forms.

Admin menu

The Admin menu is the control center of the system. All CMS actions are controlled via this menu. It appears only in the backend, that is, only when you are logged in to the system.

CAPTCHA

Abbreviation for: Completely Automated Public Turing test to tell Computers and Humans Apart

CSS

CSS = Cascading Style Sheets

A formatting language for HTML web pages. The goal here is to separate content from appearance.

PHP

PHP = Hypertext Preprocessor, originally Personal Home Page Tools

PHP is a scripting language commonly used to create dynamic websites.

Templates

Templates are design patterns for websites that behave like masks. They determine the place where elements appear and influence their appearance.