Login / Status
developer.Resource
Home . Documentation . Document Library . Extension Manuals
Sponsors
hosted by punkt.deTYPO3 and Open Source MagazineAOE Media

Chapter 1. EXT: FE extended mailform functionality

Version 4.0.7

Extension Key: th_mailformplus

Copyright 2000-2007, Dev-Team Typoheads, <dev@typoheads.at>

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

1.1. Introduction

First of all:

Many thanks to all the people who supported me and helped improving this extension!

What does it do?

When you reach the limits of the standard mailform functionality of typo3 (especially when you want the form to look special) you can use this module to use your conventional HTML-forms (as HTML-snippets) with full mailform functionality.

  1. Displays your conventional HTML-form

  2. checks fields that have to be filled out – displays error message (you can specify the fields you want to check)

  3. sends all fields with the values to one or more e-mail addresses (also configurable)

  4. if successful: it does a redirect to a page (also configurable)

  5. full javascript support for validating fields before the form is submitted (has to be implemented manually in the HTML snippet containing the form)

  6. current languages: English, German, Italian (since 2.4.0)

  7. you can send a special formatted email to the user himself e.g. “confirmation” or “thank you for your interest, we will contact you soon”

  8. you can automatically fill out the form with the data of the frontend user who is logged in. (since 2.4.0)

  9. submitted data is stored in the database and can be exported via .csv file (since 3.0)

  10. data can be stored in a DB table of your choice (can be configured via TypoScript) plus file upload support: user can upload a file (you can limit type and size via typoscript) (since 3.1)

  11. extended error messages: you can define your own error messages for the fields (since 3.1)

  12. build dynamic input forms with the use of TypoScript (since 3.4)

  13. “secure” mailform with captcha support (ext: “captcha”) (since 3.7)

  14. multipage forms (since 3.9)

  15. HTML mails, plain text mails, multipart mails (HTML+plain) (since 3.9)

  16. server side error check (since 3.9)

  17. better file upload handling (since 3.9)

  18. summary of submitted form on the “thank you” page via PRINT-subtemplate stored in session (since 3.9)

  19. multipage forms, where the templates of the different steps can be loaded depending of user input/selection. (since 4.0.0)

  20. backend multilanguage support using flexforms (since 4.0.0)

  21. frontend multilanguage support (since 4.0.0)

  22. Spam protection and notification mechanism (since 4.0.0)

  23. Automatically mark required fields in frontend (since 4.0.1)

  24. Frontend listing of sent form data (since 4.0.1)

  25. Redesigned backend view for csv export with new features (since 4.0.1)

New in Version 4.0.7

  1. bugfixed email_html_as_attachment TS option

  2. bugfixed replacement of empty markers

  3. new feature to process form values before actually processing the form through Mailformplus

  4. bugfixed checking of arrays

  5. updated language files

New in Version 4.0.6

  1. bugfixed initialization of $this->get_post

  2. added some forgotten translations to locallang_db.xml

  3. added functionality for postprocessing form data

  4. moved loading of default values to include TS settings

  5. added description for TS-option noDefaultErrorList to manual

  6. small bugfix in debug mode

  7. small bugfix in improved_demo.html

  8. bugfixed replacing of not matched markers (thanks to Claudio Strizzolo <Claudio.Strizzolo(at)ts.infn.it>)

  9. new TS option email_html_as_attachment to send html version of email as attachment (thanks to Claudio Strizzolo <Claudio.Strizzolo(at)ts.infn.it>)

  10. Added possibility to enter a comma separated list of email addresses and form filed as default.email_to

  11. New TS option to save the form values into a different DB (requires ext “adodb”)

  12. Bugfixed uploading of multiple files

New in Version 4.0.5

  1. bugfixed newlines in plaintext mails

  2. New configuration feature: different forms can be predefined via TypoScript – one of the predefined forms can be selected via dropdown in the plugin element

  3. UPDATE already stored records in the DB instead of INSERTing a new record

  4. error_check “isNotInDBTable” and “isInDBTable” can be extended with a “where” string

New in Version 4.0.4

  1. Bugfixed usage of textareas: linebreaks in textareas get converted to <br /> in html emails.

  2. Added hook to fill custom markers in the template (thx to Sebastian Baumann <sebastian.baumann(at)vipa.de> and Georg Ringer <mail(at)ringerge.org>)

  3. Use TS markers in ###TEMPLATE_SUBMITTED_OK###

  4. When reloading a submitted form, the initial form will be displayed, not the TEMPLATE_SUBMITTED_OK anymore.

  5. bugfixed usage of errorUserFunc

  6. bugfixed reading of correct print template (thx to Michael Trammer <trammer(at)sethora.de>)

  7. bugfixed usage of markers with German Umlauts. (thx to Kai Draeger <k.draeger(at)media-arts.de>)

  8. bugfixed usage of mailformplus with RealUrl. No more # in javascript back and next links. (thx tp Ralf Merx <ralf.merz(at)heindl.de>)

  9. Added XML versions of all language files.

  10. Language markers in HTML template file can now be uppercase too (Note: In language file please use lowercase version).

  11. Example files for usage of the three supported captcha extension in folder example_form/captcha.

  12. New TS option noDefaultErrorList to disable listing of all errors occurred in the marker ###error###.

  13. Bugfixed usage of custom error messages with captcha fields.

  14. Corrected some mistakes in the manual.

  15. Added possibility to add more than one file as attachment.

  16. Bugfixed usage of multistep forms with conditions.

  17. New feature giving possibility that not filled out fields are not shown in e-mails and subpart ###TEMPLATE_SUBMITTED_OK###. (special thx to Stephan Bauer <stephan_bauer(at)gmx.de> for the hint and the code). Have a look at “How to hide not filled out values in e-mails” for details.

  18. Important security fix! Improved file upload security and added a check against XSS.

New in Version 4.0.3

  1. new Typoscript-Option checkBinaryCrLf to replace x'0a' line feeds with <br /> in e-mail text. Have a look at section Configuration for details. (Thanks to Kurt Kunig <kurt.kunig(at)gmx.de>)

  2. Automatically mark required fields in the form.

  3. New Frontend Plugin generating a list of all sent form values. (Thanks to Kurt Kunig <kurt.kunig(at)gmx.de>)

  4. Supports spam protection using the jm_recaptcha extension

  5. bugfix: error check with ereg or eregi will work now ;)

  6. bugfix for saved absolute paths to template.

  7. bugfix: it is now possible to use ts markers in error subparts.

  8. some bugfixes when using arrays of checkboxes.

  9. bugfixed not working substitution of file upload specific markers

  10. possibility to completely turn off saving to log-table (saveLog = -1)

  11. new error checks “min” and “max” for checkbox arrays.

  12. check dates for a certain range (min date, max date)

  13. define filepath or fieldname of a file to be sent as attachment of the receiver e-mail

  14. bugfix with comma separated list of error checks: space allowed

  15. redesigned backend module view

  16. bugfixed backend listing and csv export

  17. new features to store ip address and submission date in logging table

  18. saveDB.allFields Typoscript option to store all form field values into one db field

New in Version 4.0.0

  1. new errorCheck-Options in Typoscript (isInDBTable, isNotInDBTable, notDefaultValue, userValidation)

  2. new saveDB-Options in Typoscript to save Arrays in DB (fields.seperator) (Thanks to Christian Müller <christian(at)kitsunet.de>)

  3. new saveDB-Options in Typoscript for mapping (fields.[fieldname].mapping, .preProcessing, .if_is_empty)

  4. Spam protection options in TS ( doNotCheckReferrer, spamNotify)

  5. Further Spam protection: form can only be submitted once (session)

  6. Multilanguage support via Markers ###LLL:fieldname### with according entry 'fieldname' and 'error_fieldname' in  a language file defined via TypoScript-setting plugin.tx_thmailformplus_pi1.langFile (Thanks to Jörg Körner <jk(at)idaa-net.de>)

  7. Possibility to define multipage forms with different routes, using postfixes for the template subparts. These postfixes can also be used for error and email subparts to define different error texts or email texts for different user chosen routes. Integrated fallback mechanism to search for other templates if none is found with current postfix.

  8. New markers ###REL_URL### and ###ABS_URL### for relative and absolute path to the form page.

  9. To ensure XHTML-conformity: changed 'checked' to 'checked=”checked”' and 'selected' to 'selected=”selected”' (Thanks to Maik Vlcek <maik.vl(at)web.de>)

  10. New TS-Setting multipage_without_js to give possibility to set up multipage forms not using JavaScript (Thanks to Ralf Hettinger <info(at)ralfhettinger.de>)

  11. New TS-Setting multipage_without_auto_hidden to give possibility to set up multipage forms not hiding unused form step using CSS. (Thanks to Ralf Hettinger <info(at)ralfhettinger.de>)

  12. Template can be saved as content element of a page, not only be imported from a file (Thanks to John Angel <johnange(at)gmail.com>)

  13. New saveDB-Setting specialMapping (sub_datetime, crdate, logIP, storeuid)

  14. Backend multilanguage-support using flexforms (Thanks to Marcel Alburg <alb@weeaar.com>)

  15. Fixed some minor bugs, including bug, when uploading files with blanks or . in filename. (Thanks to Felix Gebhard <fgebhard(at)exinit.de>, Stefan Fetsch <sfetsch(at)wollert-it.com> and Michael Wagner <kontakt@michael-wagner.de>)

  16. New marker for reference to saveDB uid (activated by saveDB.specialMapping.storeuid): ###DB_UID###

  17. Hook handler class with 3 examples show_form_postHandling, send_form_markers, error_eval provided by Ralf Hettinger.

  18. New TS-Setting plugin.tx_thmailformplus_pi1.correctRedirectUrl to substitute '&amp;' with '&' in redirect URLs.

  19. plugin.tx_thmailformplus_pi1.default.* can now not only be TEXT objects, but any TS-object.

  20. plugin.tx_thmailformplus_pi1.markers.[fieldname] can have new value SUBPART to substitute a marker with a subpart both defined in the HTML template

  21. New TS-Option to disable the errorChecks of form fields.

  22. New TS-Option to be able to dynamically load a stylesheet file.

  23. fixed bug, when using “fvalidate” for javascript form check.

  24. new option to define multilanguage error texts with typoscript (Thanks to Stano Paška <stanislav.paska@kios.sk>)

New in version 3.9.0

  1. multipage forms (attention: only works with JavaScript enabled, special naming requirements within template)

  2. sending mails: HTML, plain, HTML+ plain (multipart). special thx to Andreas Westermaier!

  3. server side error check: defined via TypoScript. predefined checks like “email”, “integer”,.. built in. advanced error checks via regular expression can be defined.

  4. file uploads: file size, type upload directory can be defined per upload field via TypoScript.

  5. PRINT-template showing a summary of the submitted form on the “thank you” page (note: since this template is stored in session data, it has to be printed out via a user-function)

  6. all values are now automatically stripslashes() and htmlspecialchars() transformed to prevent code injection

New in version 3.8.0

  1. TYPO3 4.0 compatible (path to tslib directory)

  2. template-file: reference to file can be stored instead of making a copy

  3. new TypoScript setting:saveDB.if_is_empty.[fieldname] = [value if field is not filled out]

  4. log-table: field "date" changed to "logdate" (typ:timestamp)

  5. example mailform provided in "example_form/" directory

  6. "email from" field can have blanks now: "my real name" <email@domain.com>

  7. bugfix: PHP 4.4.2. header(..."\n\n") fixed

  8. bugfix: export to csv: first line shows field descriptions for sure

  9. bugfix: if no files uploaded: error was shown

Screenshots

Frontend multipage form with 3 steps:

Backend module:

FE-Listing: