Extension Key: sp_bettercontact
Copyright 2007, Kai Vogel, <kai.vogel ( at ) speedprogs.de>
This document is published under the Open Content License
available from http://www.opencontent.org/opl.shtml
The content of this document is related to TYPO3
- a GNU/GPL CMS/Framework available from www.typo3.com
This extension is used to display a contact form. To prevet from spam I use a regular expression validation for each input field and hidden fields with names which spam robots search for and fill out automatically.
If the form is filled out correctly, a mail with detailed information will be sent to the predefined contact person and a reply-mail goes back to the visitor.
The check routine checks for entered values in the hidden fields. If there are values, no real person could fill them out, couse the are hidden with a css-style. So it have to be a spam-robot who wants to send a contact mail.
The next step of checking is the validation of the entered values with regular expressions. For example, if the e-mail address don’t have the normal format, the mail wouln’t been sent and the visitoy gets an error-message.
Maliciously strings in the entered value of name and inquiry would be transformed to harmless strings.
If you need more then the default input fields, you can place more fields into the html-template. But you must give them a name like „WE_new-field“. There have to be a „WE_“ in front of your own name for this field. Else, the field wouldn’t been appeared in the contact message. If you give them the correct name, the fields would be appeared in the contact mail in a new paragraph. But note, the new fields wouldn’t be checked by the check routine. So it’s a security risk to place more fields into the form.
All e-mails would be sent over the normal php-function „mail()“. So you need not install any other extensions like „direktmail“.
<input type=“text“ name=“WE_my-new-field“ />
Now have fun with my first extension and feel free to send me some feedback to kai.vogel ( at ) speedprogs.de or visit my homepage ( http://www.speedprogs.de ).