Include static (from extensions):

  1. Main Template (powermail)
  2. Powermail_Frontend (powermail)
  3. Add classes and CSS based on bootstrap (powermail)

settings

# Spalten generell:
plugin.tx_powermail.settings.styles.bootstrap.numberOfColumns = 1
 
# Klassen für die einzelnen rows:
plugin.tx_powermail.settings.styles.bootstrap.fieldAndLabelWrappingClasses = form-group col-md-12
 
# Herausfinden, wozu das ist:
plugin.tx_powermail.settings.styles.bootstrap.labelClasses = control-label col-sm-4
plugin.tx_powermail.settings.styles.bootstrap.fieldWrappingClasses = col-sm-8
plugin.tx_powermail.settings.styles.bootstrap.offsetClasses = col-sm-offset-4
 
# allowed upload files:
plugin.tx_powermail.settings.misc.uploadFileExtensions = jpg,jpeg,gif,png,tif,txt,doc,docx,xls,xlsx,pdf
 
# allow HTML in Frontend:
plugin.tx_powermail.settings.misc.htmlForHtmlFields = 1
 
plugin.tx_powermail.settings.receiver.overwrite {
    senderEmail = formular@karo-s.com
    senderName = Karo-S GmbH
    subject = Kontaktformular karo-s.com
    replyToEmail = office@karo-s.com
    replyToName = Karo-S GmbH
}
constants

Templates

plugin.tx_powermail.view {
    templateRootPath = fileadmin/templates/extensions/powermail/Resources/Private/Templates/
    partialRootPath = fileadmin/templates/extensions/powermail/Resources/Private/Partials/
    layoutRootPath = fileadmin/templates/extensions/powermail/Resources/Private/Layouts/
}
constants

Eigene JavaScript-Datei verwenden

# copy file from typo3conf\ext\powermail\Resources\Private\JavaScript\Powermail\Form.js and change
page.includeJSFooter.powermailForm = fileadmin/templates/powermail/Resources/Private/JavaScript/Powermail/Form.js
setup

More/own layouts

TCEFORM {
    tx_powermail_domain_model_form {
        css {
            addItems {
                col-6 = col-6
                col-12 = col-12
            }
            altLabels {
                col-6 = Halbe Spalte
                col-12 = Ganze Spalte
            }
 
        }
    }
 
    tx_powermail_domain_model_page < .tx_powermail_domain_model_form
    tx_powermail_domain_model_field < .tx_powermail_domain_model_form
 
}
page ts

Kann dann z.B. in der Resources\Private\Layouts\Default.html abgefragt werden:

<f:comment>Form</f:comment>
<f:if condition="{form.css} == 'layout4'">
  
<f:comment>Field</f:comment>
<f:if condition="{field.css} == 'layout4'">
fluid template

Select-Box aus Unterseiten erstellen

Create a Field of type "Selectfield" and go to "Extended" and enter your typoscript at "Create from TypoScript (e.g. lib.fieldvalues)": lib.subpage_example

For example show all subpages of page id 18 in selectbox:

lib.subpage_example = CONTENT
lib.subpage_example {
    table = pages
    select {
        pidInList = 18
    }
    renderObj = COA
    renderObj {
        10 = COA
        10 {
            10 = TEXT
            10.dataWrap = {field:title}[\n]
        }
    }
}
setup

Um die Seiten ID 24 vorauszuwälen, an dir URL ?selectedpage=24 hängen und im SETUP einfügen:

plugin.tx_powermail.settings.setup.prefill {
    selectedpage = RECORDS
    selectedpage {
        tables = pages
        source.data = GP:selectedpage
        conf.pages = TEXT
        conf.pages.field = title
    }
}
setup

Werte per GET übergeben

Im Formular (Powermail) den Namen des Feldes notieren (Beispiel: {maschine})

plugin.tx_powermail.settings.setup.prefill {
    maschine = TEXT
    maschine {
        data = GP:getMaschine
    }
}
setup

Der Link muss den Parameter dann einfach mit übergeben:

<a href="index.php?id=54&getMaschine={f:format.urlencode(value: '{newsItem.title}')}" class="btn btn-default" title="Machine anfragen">Anfragen</a>

<f:comment>oder so:</f:comment>
<f:link.page pageUid="38" additionalParams="{bewerbenals: '{newsItem.title}'}" class="btn btn-default">
	<i class="bi bi-arrow-right"></i> direkt bewerben!
</f:link.page>
fluid template

Double Opt-In

Wenn man die Option Mail must be confirmed (Double Opt-In) [settings.flexform.main.optin] nutzen möchte, MUSS im Formular "This field contains the Email of the sender[sender_email]" angegeben sein!

Zudem müssen die Datei im Tab "Mail to user" ausgefüllt sein.

Ajax-Submit

# enable ajax-submit of forms:
plugin.tx_powermail.settings.setup.misc.ajaxSubmit = 1
setup

Selectfeld mit z.B. News-Titeln

In Powermail-Formular ein Selectfeld anlegen (z.B. "jobtitel"). In diesem Feld bei "Create from TypoScript (e.g. lib.fieldvalues)" eintragen: lib.subpage_example

dann per TypoScript die News-Titel abfragen und in das Selectfeld eintragen:

lib.subpage_example = CONTENT
lib.subpage_example {
    table = tx_news_domain_model_news
    select {
        pidInList = 37
    }
    renderObj = COA
    renderObj {
        10 = COA
        10 {
            10 = TEXT
            10.dataWrap = {field:title}[\n]
        }
    }
}
setup

Enable Spamshield

plugin.tx_powermail.settings.setup.spamshield.email = spamreceiver@yourdomain.de

plugin.tx_powermail {
    settings.setup {
        spamshield {
            _enable = 1
            factor = 75
            senderEmail = website@moelogistik.de
            email = loewer@werbestudio-mack.de
            emailSubject = Spam in powermail form recognized
            emailTemplate = EXT:powermail/Resources/Private/Templates/Mail/SpamNotification.html
            logfileLocation = typo3temp/logs/powermail_spam.log
            logTemplate = EXT:powermail/Resources/Private/Templates/Log/SpamNotification.html

            methods {
                # Honeypot check
                1 {
                    _enable = 1

                    # Spamcheck name
                    name = Honey Pot

                    # Class
                    class = In2code\Powermail\Domain\Validator\SpamShield\HoneyPodMethod

                    # if this check failes - add this indication value to indicator (0 disables this check completely)
                    indication = 5

                    # method configuration
                    configuration {
                    }
                }

                # Link check
                2 {
                    _enable = 1

                    # Spamcheck name
                    name = Link check

                    # Class
                    class = In2code\Powermail\Domain\Validator\SpamShield\LinkMethod

                    # if this check failes - add this indication value to indicator (0 disables this check completely)
                    indication = 3

                    # method configuration
                    configuration {
                        # number of allowed links
                        linkLimit = 2
                    }
                }

                # Name check
                3 {
                    _enable = 1

                    # Spamcheck name
                    name = Name check

                    # Class
                    class = In2code\Powermail\Domain\Validator\SpamShield\NameMethod

                    # if this check failes - add this indication value to indicator (0 disables this check completely)
                    indication = 3

                    # method configuration
                    configuration {
                    }
                }

                # Session check
                4 {
                    _enable = 1

                    # Spamcheck name
                    name = Session check

                    # Class
                    class = In2code\Powermail\Domain\Validator\SpamShield\SessionMethod

                    # if this check failes - add this indication value to indicator (0 disables this check completely)
                    indication = 5

                    # method configuration
                    configuration {
                    }
                }

                # Unique check
                5 {
                    _enable = 1

                    # Spamcheck name
                    name = Unique check

                    # Class
                    class = In2code\Powermail\Domain\Validator\SpamShield\UniqueMethod

                    # if this check failes - add this indication value to indicator (0 disables this check completely)
                    indication = 2

                    # method configuration
                    configuration {
                    }
                }

                # Value blacklist check
                6 {
                    _enable = 1

                    # Spamcheck name
                    name = Value blacklist check

                    # Class
                    class = In2code\Powermail\Domain\Validator\SpamShield\ValueBlacklistMethod

                    # if this check failes - add this indication value to indicator (0 disables this check completely)
                    indication = 7

                    # method configuration
                    configuration {
                        # Blacklisted values (could also get read from a file - simply with FLUIDTEMPLATE)
                        values = TEXT
                        values.value = viagra,sex,porn,p0rn
                    }
                }

                # IP blacklist check
                7 {
                    _enable = 1

                    # Spamcheck name
                    name = IP blacklist check

                    # Class
                    class = In2code\Powermail\Domain\Validator\SpamShield\IpBlacklistMethod

                    # if this check failes - add this indication value to indicator (0 disables this check completely)
                    indication = 7

                    # method configuration
                    configuration {
                        # Blacklisted values (could also get read from a file - simply with FLUIDTEMPLATE)
                        values = TEXT
                        values.value = 123.132.125.123,123.132.125.124
                    }
                }
            }
        }
    }
}