Mastering TypoScript: TYPO3 Website, Template, and Extension
TYPO3 Formhandler Extension
-
Upload
comsolit-ag -
Category
Technology
-
view
7.286 -
download
6
description
Transcript of TYPO3 Formhandler Extension
Seite 1 / 15www.comsolit.com Formhandler Version: 1
FormhandlerTYPO3 Usergroup Bodensee #3tsee 11. Oktober 2012 - Singen (D) Lars Messmer - comsolit AG
Seite 2 / 15www.comsolit.com Formhandler Version: 1
Vorteile
•Solid programmiert, MVC Architektur•Immenser Funktionsumfang•Sehr gute Integration in andere Extension•Geeignet für komplexere Aufgabenstellungen •Kann eigentlich alles•Gut dokumentiert, mit Examples•Wird stetig weiter entwickelt
Nachteile
•Man muss sich zuerst etwas einarbeiten•KeingrafischesBackendmodul
Seite 3 / 15www.comsolit.com Formhandler Version: 1
Im Einsatz
Seite 4 / 15www.comsolit.com Formhandler Version: 1
Im Einsatz
Seite 5 / 15www.comsolit.com Formhandler Version: 1
Im Einsatz
Seite 6 / 15www.comsolit.com Formhandler Version: 1
Templating langFile.1 = TEXT langFile.1 = {$PATH.mailform}formularLang.xml
templateFile = TEXT templateFile = {$PATH.mailform}formular.html
masterTemplateFile.1 = TEXT masterTemplateFile.1.value = {$PATH.mailformtemplates}masterFormularGlobal.html
masterTemplateFile.2 = TEXT masterTemplateFile.2.value = {$PATH.mailformtemplates}masterFormularFields.html
Subparts Sprachmarker ###LLL:vorname###
Diverse interessante Marker ###TEMPLATE_ANTISPAM### ###CAPTCHA### ###TEMPLATE_PDF### ###REL_URL### ###total_uploadedFiles### ###IF_[FIELDNAME]=[value]### ...
Includes settings.additionalIncludePaths.1 = typo3conf/ext/myExtension/hooks/ ...
Seite 7 / 15www.comsolit.com Formhandler Version: 1
Templating
Mastertemplate (HTML) <!-- ###master_input_small### --><div class=“row“> <div class=“three columns“> <labelfor=“###fieldname###“>###LLL:###fieldname#########required_###fieldname######</label> </div> <div class=“nine columns“> <inputclass=“smallinput-text“type=“text“size=“30“id=“###fieldname###“name=“###formValuesPrefix###[###fieldname###]“value=“###value_###fieldname######“/> ###error_###fieldname###### <div class=“one columns sign“> ###validate_###fieldname###### </div> </div></div><!-- ###master_input_small### -->
Language File (XML)
<?xml version=“1.0“ encoding=“utf-8“ standalone=“yes“ ?><T3locallang> <data type=“array“> <languageKey index=“default“ type=“array“> <labelindex=“required“>Feldermit*sindPflichtfelder!</label> <label index=“title“>Anrede</label> <label index=“choose“>Bitte wählen</label> <label index=“ms“>Frau</label> <label index=“mr“>Herr</label> ...
Seite 8 / 15www.comsolit.com Formhandler Version: 1
Templating
Formtemplate (HTML)<!-- ###TEMPLATE_FORM1### begin -->###master_multipart-form-start_contact-form### ###master_spamprotection-timecheck### ###master_section-start### ###master_information_required### ###master_input_small_title### ###master_input_small_name### ###master_input_small_e-mail### ... ###master_submit### ###master_section-end######master_multipart-form-end_contact-form###<!-- ###TEMPLATE_FORM1### -->
E-Mail template (HTML)<!-- ###TEMPLATE_EMAIL_ADMIN_PLAIN### -->###master_email-admin-start-plain###
<!-- ###ISSET_title### -->###master_email-line-plain_title###<!-- ###ISSET_title### --><!-- ###ISSET_name### -->###master_email-line-plain_name###<!-- ###ISSET_name### -->...
###master_email-admin-end-plain###<!-- ###TEMPLATE_EMAIL_ADMIN_PLAIN### --> (eigene Plain und HTML Parts)
Seite 9 / 15www.comsolit.com Formhandler Version: 1
PreprocessorpreProcessors { 1.class = Tx_Formhandler_PreProcessor_LoadDefaultValues1.config{ 1 { field.defaultValue={$field.value} amount.defaultValue = {$amount.value} }
} 2.class = Tx_FormhandlerPayment_PreProcessor_LoadSession2.config{ } }
Markermarkers { marker = TEXT marker.value = {$value.marker} marker = CONTENT marker { table = static_countries ... renderObj = COA renderObj { 10 = TEXT 10.field=cn_iso_2 ...
Seite 10 / 15www.comsolit.com Formhandler Version: 1
Validatorsvalidators { 1 { class = Tx_Formhandler_Validator_Default config{ fieldConf{ title.errorCheck.1=required email { errorCheck { 1=required 2 = email 3 = isNotInDBTable 3 { table = fe_users field=email showHidden = 1 } } } # for an array of checkboxes documents.errorCheck { 1 = minItems 1.value = 2 } ....
Error Wraps singleErrorTemplate { totalWrap = <div class“errorBox> | </span> singleWrap = <span class=“error“> | </span> } isErrorMarker { default = <img src=“{$PATH.img}errorSign.png“ /> }
Seite 11 / 15www.comsolit.com Formhandler Version: 1
Conditions
if { 1 { conditions {OR1.AND1=radiofield={$value.radioField} }
isTrue { validators { 1 { .... }
isFalse { validators { 1 { .... }
Seite 12 / 15www.comsolit.com Formhandler Version: 1
Interceptor # Order No. saveInterceptors.1.class = Tx_FormhandlerPayment_Interceptor_OrderId settings.saveInterceptors.1.config{ ... }
# Spam Protection saveInterceptors.2.class = Tx_Formhandler_Interceptor_AntiSpamFormTime settings.saveInterceptors.2.config{ minTime.value = 1 minTime.unit = seconds maxTime.value = 1 maxTime.unit = hours redirectPage = {$PAGE.error} loggers.1.class = Tx_Formhandler_Logger_DB }
# Payment Process saveInterceptors.3.class=Tx_FormhandlerPayment_Interceptor_Postfinance saveInterceptors.3.config{ #transport: get / curl / post transport = get apiServer =https://e-payment.postfinance.ch/ncol/ # apiMode: test / prod apiMode = prod
Seite 13 / 15www.comsolit.com Formhandler Version: 1
Finisher # send E-Mail 1.class = Finisher_Mail 1.config{ checkBinaryCrLf = message admin { templateFile = TEXT templateFile.value = {$PATH.mailformtemplates}emailAdmin.html ...
# DmailSubscription 2.class = Tx_Formhandler_Finisher_DmailSubscription 2.config{ NewsletterSysfolderId = {$PID.tt_addressFolder} ...
# store in DB 3.class = Finisher_DB 3.config{ table = tt_content key = uid fields{ ...
# Redirect 4.class = Finisher_Redirect 4.config{ redirectPage = {$PID.redirectPage} }
Seite 14 / 15www.comsolit.com Formhandler Version: 1
Einsatzgebiet:
•Normales Formular•Multistep Formular mit Conditions•Newsletter Registrierung•User Registrierung •User Login•Payment / Bestellformular•Seminaranmeldung•Datei Upload Formular•DateiRequestFormular•Gästebuch•Kommentarformular•FAQ Formular•Feedback Formular•Fragebogen•...
Seite 15 / 15www.comsolit.com Formhandler Version: 1
Links:
Offizielle Seite mit Docu und Tutorials: http://www.typo3-formhandler.com/
Forge: http://forge.typo3.org/projects/show/extension-formhandler/
TER:http://typo3.org/extensions/repository/view/formhandler/
#t3see - http://www.t3see.de/