You can use the logical form immediately. In the default mode the logical form has
a country field and
a city field.
The form evaluates
if obligated fields are filled up and
if the visitor is from the European Union or not.
Add three pages with the following structure to your typo3 backend:
Default sample
Success
Failure
Illustration 9: Default example
In the page “Success” you add a text element with this content e.g.:
You are European Union!
The evaluation of the data was successful.
You can publish here everything for visitors who are from a country in the European Union like
Germany or
Spain
In the page “Failure” you add a text element with this content e.g.:
Not a member of EU
You can publish here everything for visitors who are not from the European Union because they are from
Switzerland or
USA
Add the plugin “logical form” to the page “Default sample”
Next, please add an extension template with the name “+ext logical_form”.
Illustration 10: Default sample with the plugin and the template
Configure the template:
Insert in the field “setup” the following lines (the pids are the pids of your pages “Success” and “Failure):
plugin.tx_logicalform_pi1.pids.success = 637
plugin.tx_logicalform_pi1.pids.failure = 636
Insert in the field “include static template” the template “static (logical_form)” like in the illustration below.
Illustration 11: Configuration of the extension template
Illustration 12: The logical form in the frontend
The result in the frontend have to be the logical form like in the illustration.
Please test your logical form (look the examples above in the chapter “screenshots” on page 2):
Send the form without any value: There will be two error messages.
Send it with the values “Germany” and a city of your choice: There will be the message, that you are a member of the European Union.
Send it with the values “Switzerland” and a city of your choice: There will be the message, that you aren't a member of the European Union.
If you want to know, how to configure the logical form plugin
give the two further examples a trial in the tutorial below or
take a look in the reference on page 20 or
check the setup of the tx_logicalform_pi1 with the typoscript object browser.
In this exercise we use the logical form in a cascading way:
We ask, if the user understand our disclaimer.
If yes we will guide our visitor to the next page, where we will ask him, if he is a member of the European Union. We will add some country fields.
Illustration 13: Page tree in the backend
We need following pages and structure:
Disclaiming
Country
Success
Failure
Failure
Feel free to add the following content:
Disclaiming:DisclaimerThis is the place where you can explain what to disclaim. In the first step you can ask your visitor if he understands your explanation.
Country:Are you a member of EU?We want to know, if a visitor is coming from a country which is a member from the european union. If yes, we will guide him to a "success"-page. We will guide all other vistors to a "unsuccess"-page.
SuccessYou are European Union!The evaluation of the data was successful. You can publish here everything for visitors who are from a country in the European Union like- Germany or- Spain
Failure:Not a member of EUYou can publish here everything for visitors who are not from the European Union because they are from- Switzerland or- USA
FailureSorry, you are to stupidWe can't help you anymore.
Now we build our first own logical form.
Next, please add an extension template with the name “+ext logical_form” like in the example of “configure the extension template” on page 4.
Insert in the field “setup” the following lines (the pids are the pids of your pages “Country” (case success) and “Failure” (like the illustration on page 5):
#
# WORKFLOW
# ========
#
plugin.tx_logicalform_pi1.workflow = failure_page
plugin.tx_logicalform_pi1.pids.failure = 493
plugin.tx_logicalform_pi1.pids.success = 494
#
# FIELDS, WE DON'T NEED
# =====================
#
plugin.tx_logicalform_pi1.fields.country >
plugin.tx_logicalform_pi1.fields.city >
#
# FIELDS
# ======
#
plugin.tx_logicalform_pi1.fields.confirm.radio.br = 0
plugin.tx_logicalform_pi1.fields.confirm.radio.required = 1
plugin.tx_logicalform_pi1.fields.confirm.radio.value.0 = no
plugin.tx_logicalform_pi1.fields.confirm.radio.value.1 = yes
plugin.tx_logicalform_pi1.fields.confirm.radio.failure.0 = no
#
# LANGUAGE EN (DEFAULT)
# =====================
#
plugin.tx_logicalform_pi1._LOCAL_LANG.en.field_confirm = I have understand the disclaimer
plugin.tx_logicalform_pi1._LOCAL_LANG.en.legend = Confirmation
plugin.tx_logicalform_pi1._LOCAL_LANG.en.value_yes = Yes
plugin.tx_logicalform_pi1._LOCAL_LANG.en.value_no = No
plugin.tx_logicalform_pi1._LOCAL_LANG.en.submit_button_label = Send
#
# LANGUAGE DE
# ===========
#
plugin.tx_logicalform_pi1._LOCAL_LANG.de.field_confirm = Ich habe den Disclaimer verstanden
plugin.tx_logicalform_pi1._LOCAL_LANG.de.legend = Bestätigung
plugin.tx_logicalform_pi1._LOCAL_LANG.de.value_yes = Ja
plugin.tx_logicalform_pi1._LOCAL_LANG.de.value_no = Nein
plugin.tx_logicalform_pi1._LOCAL_LANG.de.submit_button_label = Weiter
The whole setup is written in the file pi1/samples/setup_disclaim_1st.txt. You can read the file with the extension manager:
Illustration 14: The setup code
Or copy the code above and paste it into your setup.
Insert in the field “include static template” the template “static (logical_form)” like in the illustration in the example of “configure the extension template” on page 4.
The Logical Form should look like this in the frontend now:
Illustration 15: Your first logical form
If you choose “No” the logical form will guide you to the failure page.
If you choose “Yes” the logical form will guide you to the success page.
Now we have to configure the success page. But before we explain the used setup code.
The “workflow” has to possibilities:
failure_page
form
The first (“failure_page”) means, that if the values aren't the values we want (the visitor doesn't understand the disclaimer), then the visitor will guided to a page with a message.
The second (“form”) means, that the visitor will get an error message on the same page – the page with the logical form. Example for this message: Sorry, there is a mistake in your mail address.
#
# WORKFLOW
# ========
#
plugin.tx_logicalform_pi1.workflow = failure_page
The pids are the pids of your pages for success (in this example the page “Country”) and failure (like the illustration on page 5).
plugin.tx_logicalform_pi1.pids.failure = 493
plugin.tx_logicalform_pi1.pids.success = 494
In the default mode the logical form has two fields – country and city. We don't need it, we delete it.
#
# FIELDS, WE DON'T NEED
# =====================
#
plugin.tx_logicalform_pi1.fields.country >
plugin.tx_logicalform_pi1.fields.city >
But we need a radio button with the two values “no” and “yes”.
“fields.confirm” is the name of the field.
“fields.confirm.radio” is the Html type of the field in the form.
“fields.confirm.radio.br” has the following effect:
0: There will be no line break between the values
1: There will be a line break between the values
“fields.confirm.radio.required” has the following effect:
0: The visitor doesn't have to fill up the field.
1: The visitor has to fill up the field. There will be added an asterisk to the field name in the form automatically. There will be added the comment “Please complete fields which have an asterisk” at the bottom of the form automatically.You can edit every language expression. See Chapter “How to configure language for fields and values“ on page 15.
“fields.confirm.radio.value” is an array with the values of the radio button.
“fields.confirm.radio.failure” is an array with the values, we don't want to accept for the success case.
#
# FIELDS
# ======
#
plugin.tx_logicalform_pi1.fields.confirm.radio.br = 0
plugin.tx_logicalform_pi1.fields.confirm.radio.required = 1
plugin.tx_logicalform_pi1.fields.confirm.radio.value.0 = no
plugin.tx_logicalform_pi1.fields.confirm.radio.value.1 = yes
plugin.tx_logicalform_pi1.fields.confirm.radio.failure.0 = no
With the _LOCAL_LANG array you can configure the display of your field names and values.
If you want to determine the displayed name of the field, you have to set it in this format:
language.field_name = value
“language” has the value of the language like “en” for English or “de” for german.
“field_name” has the value “field_” and than the name of the field. In the example above we defined the displayed name of the field “confirm”: _LOCAL_LANG.en.field_confirm = I have understand the disclaimer.
If you want to determine the displayed values of a field, you have to set it in this format:
language.value_name = value
“language” has the value of the language like “en” for English or “de” for german.
“value_name” has the value “value_” and than the name of the value. In the example above we defined the displayed name of the value “yes”: _LOCAL_LANG.en.value_yes = Yes
Here you have the value for the submitbutton:
_LOCAL_LANG.en.submit_button_label = Yes
#
# LANGUAGE EN (DEFAULT)
# =====================
#
plugin.tx_logicalform_pi1._LOCAL_LANG.en.field_confirm = I have understand the disclaimer
plugin.tx_logicalform_pi1._LOCAL_LANG.en.legend = Confirmation
plugin.tx_logicalform_pi1._LOCAL_LANG.en.value_yes = Yes
plugin.tx_logicalform_pi1._LOCAL_LANG.en.value_no = No
plugin.tx_logicalform_pi1._LOCAL_LANG.en.submit_button_label = Send
Below there is the same example for german language:
#
# LANGUAGE DE
# ===========
#
plugin.tx_logicalform_pi1._LOCAL_LANG.de.field_confirm = Ich habe den Disclaimer verstanden
plugin.tx_logicalform_pi1._LOCAL_LANG.de.legend = Bestätigung
plugin.tx_logicalform_pi1._LOCAL_LANG.de.value_yes = Ja
plugin.tx_logicalform_pi1._LOCAL_LANG.de.value_no = Nein
plugin.tx_logicalform_pi1._LOCAL_LANG.de.submit_button_label = Weiter
The success page “Country” is showing the same logical form like the page “Disclaiming”.
Illustration 16: Page "Country" without configuration
This isn't a surprise really, because we didn't configure the extension template of the page “Country”.
Our page “Country” should look like this:
Illustration 17: Page "Country" with configuration
We have to complete the following orders:
We want to display the default logical form with the fields “country” and “city”.
We have to configure the pids of the success and failure page.
We have to delete the field confirm.
Next, please add an extension template with the name “+ext logical_form”.
Illustration 18: Default sample with the plugin and the template
Configure the template:
Insert in the field “setup” the following lines (the pids are the pids of your pages “Success” and “Failure):
#
# WORKFLOW
# ========
#
plugin.tx_logicalform_pi1.workflow = failure_page
plugin.tx_logicalform_pi1.pids.failure = 496
plugin.tx_logicalform_pi1.pids.success = 495#
# FIELDS, WE DON'T WANT AND WE DELETE
# ===================================
#
plugin.tx_logicalform_pi1.fields.confirm >
Insert in the field “include static template” the template “static (logical_form)” like in the illustration below.
Illustration 19: Configuration of the extension template
The result in the frontend should look like this:
Illustration 20: Page "Country" with configuration
This exercise demonstrate, how to create a form for ordering something:
We need only a success page (for confirmation) and we don't need a failure page.
We have to delete the default fields.
We have to create some fields.
We have to configure the mails to the provider and the visitor.
Illustration 21: Confirmation example
Add two pages in the following structure to your typo3 backend:
Confirmation
Success
Please add to the page “Confirmation”
this content:ConfirmationThis an example for the confirmation case.E.g. a visitor like to get a document by postal delivery. He can order the document with the form above. He will get a confirmation if he filled up every field and if there is no mistake in the mail.
the plugin “Logical Form”
and an extension template “+ext logical_form”
Please add to the page “Success” this content:
Thank youThanks for ordering our document.If you have any question please call us. * Contact (Link to your contact page)
Next, please add an extension template with the name “+ext logical_form” like in the example of “configure the extension template” on page 4.
Insert in the field “include static template” the template “static (logical_form)” like in the illustration in the example of “configure the extension template” on page 4.
Insert in the field “setup” the following lines (the pid is the pid of your page “Success”:
#
# WORKFLOW
# ========
#
plugin.tx_logicalform_pi1.workflow = form
plugin.tx_logicalform_pi1.pids.failure >
plugin.tx_logicalform_pi1.pids.success = 634
#
# MAIL TO THE CLIENT, THE VISITOR OF OUR WEBSITE
# ==============================================
#
plugin.tx_logicalform_pi1.mail.to_client = 1
plugin.tx_logicalform_pi1.mail.to_client.from.mail = name@my.provider.com
plugin.tx_logicalform_pi1.mail.to_client.from.name = my provider company
plugin.tx_logicalform_pi1.mail.to_client.bcc = dirk.wildt@think-visually.com
plugin.tx_logicalform_pi1.mail.to_client.field = mail
plugin.tx_logicalform_pi1.mail.to_client.body = mail_client
plugin.tx_logicalform_pi1.mail.to_client.signature.0 = my provider company
plugin.tx_logicalform_pi1.mail.to_client.signature.1 = my provider contact
plugin.tx_logicalform_pi1.mail.to_client.signature.2 = my provider street
plugin.tx_logicalform_pi1.mail.to_client.signature.3 = my provider zip and city
plugin.tx_logicalform_pi1.mail.to_client.signature.4 = my provider phone
plugin.tx_logicalform_pi1.mail.to_client.signature.5 = my provider mail address
#
# FIELDS, WE DON'T NEED
# =====================
#
plugin.tx_logicalform_pi1.fields.country >
plugin.tx_logicalform_pi1.fields.city >
#
# NEW FIELDS
# ==========
#
plugin.tx_logicalform_pi1.fields.mail.input.failure.0 = my.name@example.com
plugin.tx_logicalform_pi1.fields.mail.input.failure.1 = dirk.wildt@think-visually.com
plugin.tx_logicalform_pi1.fields.mail.input.default = my.name@example.com
plugin.tx_logicalform_pi1.fields.mail.input.size = 30
plugin.tx_logicalform_pi1.fields.mail.input.maxlength = 60
plugin.tx_logicalform_pi1.fields.mail.input.required = 1
plugin.tx_logicalform_pi1.fields.mail.input.mail = 1
plugin.tx_logicalform_pi1.fields.sexus.radio.br = 0
plugin.tx_logicalform_pi1.fields.sexus.radio.required = 1
plugin.tx_logicalform_pi1.fields.sexus.radio.value.0 = male
plugin.tx_logicalform_pi1.fields.sexus.radio.value.1 = female
plugin.tx_logicalform_pi1.fields.name.input.size = 30
plugin.tx_logicalform_pi1.fields.name.input.maxlength = 60
plugin.tx_logicalform_pi1.fields.name.input.required = 1
plugin.tx_logicalform_pi1.fields.street.input.size = 30
plugin.tx_logicalform_pi1.fields.street.input.maxlength = 60
plugin.tx_logicalform_pi1.fields.street.input.required = 1
plugin.tx_logicalform_pi1.fields.zip_city.input.size = 30
plugin.tx_logicalform_pi1.fields.zip_city.input.maxlength = 60
plugin.tx_logicalform_pi1.fields.zip_city.input.required = 1
plugin.tx_logicalform_pi1.fields.phone.input.size = 30
plugin.tx_logicalform_pi1.fields.phone.input.maxlength = 60
plugin.tx_logicalform_pi1.fields.phone.input.required = 1
plugin.tx_logicalform_pi1.fields.note.textarea.cols = 30
plugin.tx_logicalform_pi1.fields.note.textarea.rows = 5
plugin.tx_logicalform_pi1.fields.note.textarea.required = 0
#
# LANGUAGE EN (DEFAULT)
# =====================
#
plugin.tx_logicalform_pi1._LOCAL_LANG.en.legend = I want this document
plugin.tx_logicalform_pi1._LOCAL_LANG.en.field_mail = Mail
plugin.tx_logicalform_pi1._LOCAL_LANG.en.field_name = First and last Name
plugin.tx_logicalform_pi1._LOCAL_LANG.en.field_note = Message to the provider
plugin.tx_logicalform_pi1._LOCAL_LANG.en.field_phone = Phone
plugin.tx_logicalform_pi1._LOCAL_LANG.en.field_sexus = Gender
plugin.tx_logicalform_pi1._LOCAL_LANG.en.field_street = Street
plugin.tx_logicalform_pi1._LOCAL_LANG.en.field_zip_city = ZIP and City
plugin.tx_logicalform_pi1._LOCAL_LANG.en.mail_client_subject = Delivery of the ordered document
plugin.tx_logicalform_pi1._LOCAL_LANG.en.mail_client_text (
Dear ###VALUE_NAME###,
Thanks for ordering our document.
We will send it with postal delivery to your address:
###VALUE_NAME###
###VALUE_STREET###
###VALUE_ZIP_CITY###
You have send the following data:
###VALUES###
If there is any mistake please send the correct data.
Please visit this page and fill up the form:
###URL###
This is a mechanical message.
Best Regards
###SIGNATURE###
)
plugin.tx_logicalform_pi1._LOCAL_LANG.en.value_female = Female
plugin.tx_logicalform_pi1._LOCAL_LANG.en.value_male = Male
#
# LANGUAGE DE
# ===========
#
plugin.tx_logicalform_pi1._LOCAL_LANG.de.legend = Ich möchte das Dokument
plugin.tx_logicalform_pi1._LOCAL_LANG.de.field_mail = eMail
plugin.tx_logicalform_pi1._LOCAL_LANG.de.field_name = Vor- und Nachname
plugin.tx_logicalform_pi1._LOCAL_LANG.de.field_note = Nachricht an den Betreiber
plugin.tx_logicalform_pi1._LOCAL_LANG.de.field_phone = Telefon
plugin.tx_logicalform_pi1._LOCAL_LANG.de.field_sexus = Anrede
plugin.tx_logicalform_pi1._LOCAL_LANG.de.field_street = Straße
plugin.tx_logicalform_pi1._LOCAL_LANG.de.field_zip_city = PLZ und Ort
plugin.tx_logicalform_pi1._LOCAL_LANG.de.mail_client_subject = Versand des bestellten Dokuments
plugin.tx_logicalform_pi1._LOCAL_LANG.de.mail_client_text (
Hallo ###VALUE_NAME###,
herzlichen Dank für die Bestellung unseres Dokuments.
Wir senden Ihnen das Dokument per Post an Ihre Adresse:
###VALUE_NAME###
###VALUE_STREET###
###VALUE_ZIP_CITY###
Sie haben uns folgende Daten gesendet:
###VALUES###
Sollte in den Daten ein Fehler stecken, senden Sie uns Ihre richtigen Daten bitte ein zweites Mal.
Besuchen Sie dafür bitte folgende Seite:
###URL###
Dies ist eine automatische generierte Mitteilung.
Mit freundlichen Grüßen
###SIGNATURE###
)
plugin.tx_logicalform_pi1._LOCAL_LANG.de.value_female = Frau
plugin.tx_logicalform_pi1._LOCAL_LANG.de.value_male = Herr
We don't repeat the explanation of the example above “Explanation of the setup code” on page 7. If you didn't read it, please read and understand it now.
The workflow value is “form”, because there is only the failure case of missing data or wrong mail addresses. In this case every error should displayed with a message in the form and not in a failure page:
We set workflow to: form
We delete the value pids.failure
#
# WORKFLOW
# ========
#
plugin.tx_logicalform_pi1.workflow = form
plugin.tx_logicalform_pi1.pids.failure >
plugin.tx_logicalform_pi1.pids.success = 634
The array mail.to_client is explained in the chapter “mail” on page 16.
Illustration 23: The form without language configuration
In our form we need the following fields:
mail (input)
sexus (radio)
name (input)
street (input)
zip_city (input)
note (input)
It is easier to understand the controlling of the Logical Form, if we don't use the language configuration.
Therefor we commented out the lines with the language configuration as shown below:
#plugin.tx_logicalform_pi1._LOCAL_LANG.en.legend = I want this document
#plugin.tx_logicalform_pi1._LOCAL_LANG.en.field_mail = Mail
#plugin.tx_logicalform_pi1._LOCAL_LANG.en.field_name = First and last Name
#plugin.tx_logicalform_pi1._LOCAL_LANG.en.field_note = Message to the provider
#plugin.tx_logicalform_pi1._LOCAL_LANG.en.field_phone = Phone
#plugin.tx_logicalform_pi1._LOCAL_LANG.en.field_sexus = Gender
#plugin.tx_logicalform_pi1._LOCAL_LANG.en.field_street = Street
#plugin.tx_logicalform_pi1._LOCAL_LANG.en.field_zip_city = ZIP and City
#plugin.tx_logicalform_pi1._LOCAL_LANG.en.value_female = Female
#plugin.tx_logicalform_pi1._LOCAL_LANG.en.value_male = Male
The following images show, how to control fields.
Field name, field type and field values
Illustration 24:plugin.tx_logicalform_pi1.fields.mail...plugin.tx_logicalform_pi1.fields.sexus...
Illustration 25:plugin.tx_logicalform_pi1.fields.mail.input...plugin.tx_logicalform_pi1.fields.sexus.radio...
Illustration 26:plugin.tx_logicalform_pi1.fields.sexus.radio.value.0 = maleplugin.tx_logicalform_pi1.fields.sexus.radio.value.1 = female
Required fields
Illustration 27:plugin.tx_logicalform_pi1.fields.mail.input.required = 1plugin.tx_logicalform_pi1.fields.sexus.radio.required = 1
Default values and evaluating of a mail address
Illustration 28:plugin.tx_logicalform_pi1.fields.mail.input.default = my.name...
Illustration 29:plugin.tx_logicalform_pi1.fields.mail.input.mail = 1
In our example we want that
the field “mail” will be displayed as “Mail”,
“sexus” as “Gender” and
the values “male” as “Male” and “female” as “Female”
#
# LANGUAGE EN (DEFAULT)
# =====================
#
...
plugin.tx_logicalform_pi1._LOCAL_LANG.en.field_mail = Mail
...
Illustration 30: Our form without any translation
Illustration 31:..._LOCAL_LANG.en.field_mail = Mail..._LOCAL_LANG.en.field_sexus = Gender
Illustration 32:..._LOCAL_LANG.en.value_female = Female'..._LOCAL_LANG.en.value_male = Male
You have to configure the array “ mail.to_client...”.
You have to set the flag “mail.to_client” to 1, otherwise the server won't send any mail to a client.
#
# MAIL TO THE CLIENT, THE VISITOR OF OUR WEBSITE
# ==============================================
#
plugin.tx_logicalform_pi1.mail.to_client = 1
plugin.tx_logicalform_pi1.mail.to_client.from.mail = name@my.provider.com
plugin.tx_logicalform_pi1.mail.to_client.from.name = my provider company
plugin.tx_logicalform_pi1.mail.to_client.bcc = dirk.wildt@think-visually.com
plugin.tx_logicalform_pi1.mail.to_client.field = mail
plugin.tx_logicalform_pi1.mail.to_client.body = mail_client
plugin.tx_logicalform_pi1.mail.to_client.signature.0 = my provider company
plugin.tx_logicalform_pi1.mail.to_client.signature.1 = my provider contact
plugin.tx_logicalform_pi1.mail.to_client.signature.2 = my provider street
plugin.tx_logicalform_pi1.mail.to_client.signature.3 = my provider zip and city
plugin.tx_logicalform_pi1.mail.to_client.signature.4 = my provider phone
plugin.tx_logicalform_pi1.mail.to_client.signature.5 = my provider mail address
We hope, that the illustration below shows the relation between the mail and the controlling with the setup understandably.
With the value
plugin.tx_logicalform_pi1.mail.to_client.field = mail
you determine, in which field of the form we found the mail address of the client.
We explain in step II, how to configure the mail subject and the mail message.
Illustration 33:The field name of the mail address is “mail”.In the setup it's the line: plugin.tx_logicalform_pi1.fields.mail...
In the illustration on the right you found the field name “mail” in line 3 of the setup.
In our example the visitor (client) had filled up the field “mail” with the address:
dirk.wildt@puppenspiel-portal.de
Illustration 34: The sent mail and the controlling with the setup
You have to define
the subject and
the message text
in the language array “_LOCAL_LANG”. You are free, to define the string, which is marked yellow. But is has to be the same string like in the setup variable “.mail.to_client.body.
plugin.tx_logicalform_pi1.mail.to_client.body = mail_client
...
plugin.tx_logicalform_pi1._LOCAL_LANG.en.mail_client_subject = ...
plugin.tx_logicalform_pi1._LOCAL_LANG.en.mail_client_text = ...
In the message – the mail body – you may work with markers.
If you want use values, which the client have written in the form, there is this main principle:
###VALUE_fieldname###
For example:
In the form is a field called “street”, than the marker in the mail is ###VALUE_STREET###.
If you want a list of all form values, than you use the marker ###VALUES###.
There a two markers additionaly:
###URL###: The Url of the form
###SIGNATURE###: The setup array “.mail.to_client.signature...”
Our Example
plugin.tx_logicalform_pi1._LOCAL_LANG.en.mail_client_subject = Delivery of the ordered document
plugin.tx_logicalform_pi1._LOCAL_LANG.en.mail_client_text (
Dear ###VALUE_NAME###,
Thanks for ordering our document.
We will send it with postal delivery to your address:
###VALUE_NAME###
###VALUE_STREET###
###VALUE_ZIP_CITY###
You have send the following data:
###VALUES###
If there is any mistake please send the correct data.
Please visit this page and fill up the form:
###URL###
This is a mechanical message.
Best Regards
###SIGNATURE###
)
And the result:
Illustration 35: Fields and values in the form
Illustration 36: Mail with values of the form and of the setup
With Logical Form you can configure a report mail.
This mail send all datas of the form to a mail address of your choice.
Example for a configuration:
#
# MAIL REPORT I.E. TO THE ADMIN OR/AND THE PROVIDER OF THE WEBSITE
# ================================================================
#
plugin.tx_logicalform_pi1.mail.report = 1
plugin.tx_logicalform_pi1.mail.report.from.mail = webmaster@my-domain.com
plugin.tx_logicalform_pi1.mail.report.from.name = Typo3 Logical Form Report
plugin.tx_logicalform_pi1.mail.report.to.0 = henry@statistic.com
plugin.tx_logicalform_pi1.mail.report.to.1 = mary@statistic.com
plugin.tx_logicalform_pi1.mail.report.signature.0 = My company
plugin.tx_logicalform_pi1.mail.report.signature.1 = My name
plugin.tx_logicalform_pi1.mail.report.signature.2 = My street
plugin.tx_logicalform_pi1.mail.report.signature.3 = My zipcode and my city
plugin.tx_logicalform_pi1.mail.report.signature.4 = My phone
plugin.tx_logicalform_pi1.mail.report.signature.5 = my.name@my-domain.com
If you want to edit the mail content, please edit
pi1/locallang.xml (see chapter “Language” on page 26)
If you want to avoid spam use captcha.
Please install the extension Captcha Library (extension key: captcha) or freeCap CAPTCHA (extension key: sr_freecap)
Configure the use of captcha in the logical form
plugin.tx_logicalform_pi1.captcha.extkey.captcha = 1
or
plugin.tx_logicalform_pi1.captcha.extkey.sr_freecap = 1
If the logical_form extension doesn't display anything (not even an error message) check the following:
Did you set a “static template (from Extensions)” in your TS-template?
Clear all TYPO3 caches, including the temp files in typo3conf, clear your Browser cache.
The Logical Form has a debug mode. In this mode the extension will print messages in your Html code. The debug mode makes sense, if you have any problem with mailing.
Turn the debug mode on:
plugin.tx_logicalform_pi1.mail.debug = 1
You will get the following output e.g.:
Illustration 37: Example for Html output in the debug mode