定制 lavitto/typo3-form-to-database 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

lavitto/typo3-form-to-database

最新稳定版本:5.1.0

Composer 安装命令:

composer require lavitto/typo3-form-to-database

包简介

Extends the TYPO3 form with a database finisher, to save every form-result in the database.

README 文档

README

Latest Stable Version TYPO3 License

This extension adds an additional finisher to the TYPO3 Form (tx_form) to save the results into the database

Compatibility

Form to DatabaseTYPO3 Version
5.x13.4
4.x12.4
3.x11.5
2.x9.5 - 10.4

Introduction

Features

  • No configuration needed
  • No database-changes per form required
  • Shows all results per form in a separate backend module
  • Provides a CSV-download of all results
  • Preview & PDF download of individual form results
  • Automatic deletion of results after a specified number of days (GDPR)

Screenshots

Backend Overview

Backend Overview

Backend Results

Backend Results

Installation & setup

  1. composer req lavitto/typo3-form-to-database (or download from the TYPO3 Extension Repository)
  2. Add the extension as a dependency in your site as a site set
  3. Edit the form you wish to store results for
  4. Add the finisher ("Save the mail to the Database") to your form - it is recommended you place this finisher first

Usage

Command / Scheduler

It's possible to delete the form results by the command line or scheduler (Execute console commands).

Usage:
  form_to_database:deleteFormResults [<maxAge>]

Arguments:
  maxAge                Maximum age of form results in days [default: 90]

Options

There are several options available for customisation. To change these, go to Settings -> Configure Extensions -> form_to_database

  • General
    • hideLocationInList - Should the location of the form be hidden on the Form results overview module? (Default: No)
    • displayActiveFieldsOnly - If true will only output active renderables in backendModule and CSV (will not display deleted renderables stored in the formDefinition) (Default: false)
  • CSV Settings
    • csvDelimiter - What character should separate fields in the CSV export (Default: ,)
    • csvOnlyFilenameOfUploadFields - Should the CSV list the whole path or just the file name?
    • csvHtmlSpecialChars - If true will encode special chars (' => &quot;, < => &lt;) (Default: true)

Additional Feature configuration

PDF download of a single result

Details Each form response can be downloaded as a PDF which can be customised in TypoScript if [mPDF](https://mpdf.github.io/) is installed. TO utilise this feature, install mPDF as an additional dependency ``` composer req mpdf/mpdf ``` Settings can be directly passed in to mPDF by using ``` module.tx_formtodatabase_web_formtodatabaseformresults.settings.pdf.config ``` The defaults are the following, however they can be overwritten: ``` 'default_font_size' => '12', 'format' => 'A4', 'orientation' => 'P', 'margin_left' => '15', 'margin_right' => '15', 'margin_bottom' => '15', 'margin_top' => '15', 'tempDir' => Environment::getVarPath() . '/form_to_database' ``` ##### Stylesheets If you wish to pass in a custom CSS stylesheet, you can do so with the following: ``` module.tx_formtodatabase_web_formtodatabaseformresults.settings.pdf.stylesheet { link = EXT:your_extension/Resources/Public/Css/print-form-to-database.css media = all } ``` ##### Letterheads Letterheads can add information to the top and bottom of each page, it uses [SetHTMLHeader](https://mpdf.github.io/reference/mpdf-functions/sethtmlheader.html) and [SetHTMLFooter](https://mpdf.github.io/reference/mpdf-functions/sethtmlfooter.html) directly. This means all the mPDF variables are accessible. These can be added via TypoScript (`letterheads.header` and `letterheads.footer`). For example: ``` module.tx_formtodatabase_web_formtodatabaseformresults.settings.pdf.letterheads.footer ( ) ```

Contribute

We welcome issues and merge/pull requests. Please don't let conventions or failing tests put you off - we can always fix them once a request is submitted.

Please follow the TYPO3 Commit conventions if you can when committing.

Please use GitLab only for bug-reporting or feature-requests. For support use the TYPO3 community channels

To run tests & linting

The extension uses a modified version of runTests.sh from the TYPO3 core.

You need Podman installed and running to run the tests.

  • Install dependencies with TYPO3 13 and php 8.2:
    • Build/Scripts/runTests.sh -t 13 -p 8.2 -s composer install (-t is currently obsolete, as only v13 is supported and set as default)
  • Run linter:
    • Build/Scripts/runTests.sh -p 8.2 -s lintPhp
    • Build/Scripts/runTests.sh -t 13 -p 8.2 -s lintTypoScript
  • Execute functional tests:
    • Build/Scripts/runTests.sh -p 8.2 -s functional

See help menu for all options: Build/Scripts/runTests.sh --help

Commits should follow TYPO3 Commit Guidelines.

Releasing

The package is released automatically to Packagist when tagged, however TER requires a manual upload

  1. git archive -o "form_to_database_[tag].zip" [tag] where [tag] is the version just created
  2. Upload the zip file created to the TER - use the changelog for the entry

Support

If you need private or personal support, try the TYPO3 Slack channel - #ext-form-to-database or reach out to Mike directly

lavitto/typo3-form-to-database 适用场景与选型建议

lavitto/typo3-form-to-database 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 354.14k 次下载、GitHub Stars 达 16, 最近一次更新时间为 2026 年 01 月 04 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「form」 「extension」 「typo3」 「save form」 「typo3 form」 「form to database」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 lavitto/typo3-form-to-database 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 lavitto/typo3-form-to-database 我们能提供哪些服务?
定制开发 / 二次开发

基于 lavitto/typo3-form-to-database 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 354.14k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 17
  • 点击次数: 16
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 16
  • Watchers: 0
  • Forks: 39
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2026-01-04