rfuehricht/formhandler
最新稳定版本:13.0.3
Composer 安装命令:
composer require rfuehricht/formhandler
包简介
The swiss army knife for all kinds of mail forms.
README 文档
README
Basic configuration looks like this:
plugin.tx_formhandler {
view {
partialRootPaths.5 = EXT:theme/Resources/Private/Forms/Partials/
}
forms {
myform {
name = My Formhandler Form
view {
templateRootPaths.10 = EXT:theme/Resources/Private/Forms/MyForm/
partialRootPaths.10 = EXT:theme/Resources/Private/Forms/MyForm/Partials/
}
settings {
templateFile = Step1
formValuesPrefix = myform
languageFile = EXT:theme/Resources/Private/Language/myform.xlf
preProcessors {
}
interceptors {
}
validators {
}
finishers {
}
}
}
}
All configured forms are available in the plugin settings in a dropdown field. The setting name is used as a label.
view and settings of each form are merged with the "global" TypoScript in plugin.tx_formhandler. This way you can define global settings like partialRootPaths and merge them with form specific settings.
The HTML-Template may look like this:
<html data-namespace-typo3-fluid="true" xmlns:f="http://typo3.org/ns/fluid/ViewHelpers" xmlns:fh="http://typo3.org/ns/Rfuehricht/Formhandler/ViewHelpers"> <div class="form"> <f:form action="form"> <f:form.hidden name="{formValuesPrefix}[randomId]" value="{randomId}" /> <div> <f:for each="{validations.{name}}" as="check"> <f:if condition="{check.check} == 'required'"> <f:variable name="isRequired" value="*" /> </f:if> </f:for> <label for="{formValuesPrefix}-name">{fh:translate(key: 'label.name')} {isRequired}</label> <f:form.textfield id="{formValuesPrefix}-name" name="{formValuesPrefix}[name]" value="{values.name}" /> <f:if condition="{errors.name}"> <ul> <f:for as="error" each="{fh:errorMessages(field: 'name')}"> <li>{error}</li> </f:for> </ul> </f:if> </div> <f:form.submit name="{formValuesPrefix}[{submit.nextStep}]" value="{fh:translate(key: 'label.submit')}" /> </f:form> </div>
That is all for a very simple and basic form.
Have a look at the documentation for more details about available
and much more.
统计信息
- 总下载量: 23
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0-or-later
- 更新时间: 2025-07-03
