DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

EXT: Templated output of th_mailform_plus

Author:Kasper Skårhøj
Created:2002-11-01T00:32:00
Changed by:Jan Bednařík
Changed:2006-09-22T10:47:05
Email:info@bednarik.org

EXT: Templated output of th_mailform_plus

Extension Key: jb_thmailformplus_output

Copyright 2000-2002, , <info@bednarik.org>

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

Table of Contents

EXT: Templated output of th_mailform_plus 1

Introduction 1

What does it do? 1

Users manual 1

Adminstration 1

Reference 1

PHPMailer (see phpMailer documentation for more) 2

Tutorial 2

Known problems 3

To-Do list 3

Introduction

What does it do?

- Allows you to save form data to any kind of file and e-mail this file. This extension depends on th_mailformplusextension, which provides the frontend. Basically this extesnion just defines saveUserFunc of th_mailformplusext.

Users manual

Install this extension and add a static template to your site template.

img-1

Adminstration

- This ext. doesn't have its own TS. It just adds some TS to plugin.tx_thmailformplus_pi1.saveUserFunc.

Reference

template

Property

template

Data type

fileResource

Description

Path to an output template

Default

EXT:jb_thmailformplus_output/output_template.tmpl

iconv.from

Property

iconv.from

iconv.to

Data type

string

Description

Here you can define charset conversion

iconv.from = UTF-8
iconv.to = CP1250

Default

filename

Property

filename

Data type

string

Description

The output has to be saved to a file. Here you can specify the filename.

If the string contains #uniqueid# it's replaced by a string from PHP uniqueid() function. After that the string is passed to the strftime function.

Default

order-%d-%m-%Y(#uniqueid#).csv

savedir

Property

savedir

Data type

string

Description

directory where the file will be saved. Be sure, this directory exists and PHP can write to it.

Default

fileadmin/

mailit

Property

mailit

Data type

boolean

Description

Defines whether you want to send the file or not

Default

1

message

Property

message

Data type

string

Description

An e-mail message

Default

There's been a new order.

phpmailer

Property

phpmailer

Data type

->phpmailer

Description

Configuration of the phpMailer

Default

[plugin.tx_thmailformplus_pi1.saveUserFunc]

PHPMailer (see phpMailer documentation for more)

charset

Property

charset

Data type

string

Description

E-mail charset

Default

utf-8

mailer

Property

mailer

Data type

mail/smtp/sendmail

Description

Specify the method used to send an e-mail

Default

mail

smtp

Property

smtp

Data type

->smtp

Description

If smtp is used as the mailer

Default

smtp.host

Property

smtp.host

Data type

URI

Description

Default

smtp.smtpauth

Property

smtp.smtpauth

Data type

boolean

Description

Defines whether smtp authentication is needed

Default

1

smtp.smtpusername

Property

smtp.smtpusername

Data type

string

Description

Default

smtp.smtppassword

Property

smtp.smtppassword

Data type

string

Description

Default

[plugin.tx_thmailformplus_pi1.saveUserFunc.phpmailer]

((generated))
Example

Adding charset conversion:

plugin.tx_thmailformplus_pi1 {
saveUserFunc {
  iconv.from = UTF-8
  iconv.to = CP1250
}

Tutorial

First we have to design a HTML form, which will be used in the th_mailformplusext. Let's have this one:

<form name="Formular" method="post" action="index.php" enctype="multipart/form-data">
<input type="hidden" name="id" value="###PID###">
<input type="hidden" name="submitted" value="1">
<input type="hidden" name="L" value="0">
<input type="hidden" name="type" value="###value_type###">
###ERROR###
<table border="0" cellspacing="2" cellpadding="0">
<tr>
 <td valign="top">Subject</td>
 <td valign="top">###error_subject###<input type="text" name="subject" value="###value_subject###"></td>
</tr>
<tr>
 <td valign="top">e-mail</td>
 <td valign="top">###error_email###<input type="text" name="email"  value="###value_email###"></td>
</tr>
<tr>
 <td valign="top">Phone</td>
 <td valign="top">###error_phone###<input type="text" name="phone" value="###value_phone###"></td>
</tr>
</table>
</form>

We've got 3 fields – subject, email, phone. Now let's create an output template:

This is an example;
;Subject;###subject###;
;E-mail:###email###;
;Phone;###phone###;
;Some unused marker;###marker###;

Notice that the markers in output match the form field names. If there's an unused marker, it will be deleted.

Now we just have to define the mailformplus form. Settings from the form will be used:

img-2

Known problems

- Don't know.

To-Do list

- I'm done here.

For more information you can go to typo3.org .

img-3 EXT: Templated output of th_mailform_plus - 3