PHPackages                             oliverthiele/ot-formprefill - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. oliverthiele/ot-formprefill

ActiveTypo3-cms-extension

oliverthiele/ot-formprefill
===========================

TYPO3 extension that automatically fills in form fields for logged-in frontend users using values from fe\_users. Includes optional FlexForm-based field mapping and works with existing forms.

v1.0.2(10mo ago)011GPL-2.0-or-laterPHP

Since Jun 23Pushed 2mo agoCompare

[ Source](https://github.com/oliverthiele/ot-formprefill)[ Packagist](https://packagist.org/packages/oliverthiele/ot-formprefill)[ Docs](https://oliver-thiele.de)[ RSS](/packages/oliverthiele-ot-formprefill/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (2)Versions (4)Used By (0)

ot\_formprefill
===============

[](#ot_formprefill)

**Form Prefill for TYPO3 Frontend Users** – A TYPO3 v13 extension that automatically fills in form fields for logged‑in frontend users (`fe_users`). Works out‑of‑the‑box with the native **Form Framework** (EXT:form) and any form that follows the `tx_form_formframework[][]` naming scheme. Field mapping is fully configurable via FlexForm or `config.yaml` – no TypoScript required.

---

Features
--------

[](#features)

- Prefills input and textarea fields on the client side via JavaScript.
- Secure PSR‑15 middleware that exposes **only whitelisted `fe_users` fields** as JSON (`/prefill-user.json`).
- Flexible one‑to‑one mapping between `fe_users` columns and form field keys
- Generic or UID-specific mapping definitions via `config.yaml`. UID-specific mapping can also be defined per content element (via FlexForm).
- Multiple forms per page supported.
- Implemented as a dedicated **`CType`** (`formprefill`) – ready for TYPO3 v14 (no `list_type`).
- Zero database changes and no modifications to existing forms.

---

Requirements
------------

[](#requirements)

TYPO3**13.4 LTS** (13.4.14 +)PHP8.1 +Composer2.x---

Installation
------------

[](#installation)

```
composer require oliverthiele/ot-formprefill
```

- Flush caches.

---

Configuration
-------------

[](#configuration)

### Site Configuration (`config.yaml`)

[](#site-configuration-configyaml)

```
otFormprefill:
  allowedFields:
    - name
    - email
    - company
    - telephone
  formMappings:
    contactForm:
      name: text-1
      company: text-2
      email: email-1
    contactForm-19022:
      name: text-1
      company: text-3     # Overrides generic mapping
      telephone: text-4   # Adds extra field only for this form UID
```

Mappings without UID act as default (by `persistenceIdentifier`). Mappings with UID (e.g. `kontaktformular-19022`) override or extend the generic mapping.

---

### Extension Configuration (`ext_conf_template.txt`)

[](#extension-configuration-ext_conf_templatetxt)

```
# cat=basic/enable; type=string; label=Allowed FE User fields
allowedFields = username,name,title,first_name,middle_name,last_name,company,address,zip,city,country,telephone,fax,email,www

```

Used only if no `config.yaml` is present. These fields are also hard-limited in the middleware.

---

TypoScript Setup
----------------

[](#typoscript-setup)

A full TypoScript setup is provided.

### Option 1: Manual import

[](#option-1-manual-import)

If you manage TypoScript manually (e.g. in your sitepackage), include it like this:

```
@import 'EXT:ot_formprefill/Configuration/TypoScript/setup.typoscript'

```

### Option 2: TYPO3 v13 Set autoloading

[](#option-2-typo3-v13-set-autoloading)

If you're using TYPO3 v13's new "Site sets" system, you can add the dependency:

```
name: example/my-site-package
label: 'My Site Package'
dependencies:
  - oliverthiele/ot-formprefill
```

This automatically includes the setup file and assets.

---

Usage
-----

[](#usage)

### 1. Add the content element

[](#1-add-the-content-element)

Insert the `Form Prefill` content element (CType: `formprefill`) on the same page as your form.

### 2. Configure the FlexForm (optional)

[](#2-configure-the-flexform-optional)

FieldDescription**Form Identifier**Optional. Unique prefix for the form, e.g. `contactForm-42`. Required when multiple forms exist.**Mapping**One mapping per line: `fe_usersField:formFieldKey`, e.g.`company:firma``email:email`If no mapping is configured, automatic mapping is used: `fe_users.column` → same form field name.

### 3. Output

[](#3-output)

After rendering, the ViewHelper will inject the mapping into the page as JavaScript:

```

window.formPrefillMappings = {
  "contactForm-42": {
    "email": "email",
    "fullName": "name"
  }
}

```

---

Middleware: `/prefill-user.json`
--------------------------------

[](#middleware-prefill-userjson)

If a frontend user is logged in, this endpoint returns a filtered list of their fields:

```
{
  "name": "Max Mustermann",
  "email": "max@example.com"
}
```

The list is determined (in order):

1. `site/config.yaml` → `otFormprefill.allowedFields`
2. Extension setting (`ext_conf_template.txt`)
3. Fallback default

---

Developer Notes
---------------

[](#developer-notes)

- JavaScript is located in `Resources/Public/JavaScript/FormPrefill.js`, embedded via ``
- Middleware route: `Configuration/RequestMiddlewares.php`
- CType registration: `TCA/Overrides/tt_content.php`
- Icon: `Configuration/Icons.php`
- Mapping logic combines `persistenceIdentifier` and content element UID

---

Roadmap
-------

[](#roadmap)

- Unit tests for the middleware.

---

License
-------

[](#license)

GPL‑2.0‑or‑later – see `LICENSE`

---

Sponsor
-------

[](#sponsor)

Initial development was sponsored by **[WWE Media GmbH](https://www.wwe-media.de/)***Agency for digital products*

---

Author
------

[](#author)

**Oliver Thiele** – [oliver-thiele.de](https://www.oliver-thiele.de)Mail:

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance72

Regular maintenance activity

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

2

Last Release

321d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/444a8485d8bda9eb7fbee92b418d929e1eeee50334a3cbb392a38f2eda95f951?d=identicon)[oliverthiele](/maintainers/oliverthiele)

---

Top Contributors

[![oliverthiele](https://avatars.githubusercontent.com/u/5030298?v=4)](https://github.com/oliverthiele "oliverthiele (10 commits)")

---

Tags

formtypo3fe\_usersprefillfrontend userformframework

### Embed Badge

![Health badge](/badges/oliverthiele-ot-formprefill/health.svg)

```
[![Health](https://phpackages.com/badges/oliverthiele-ot-formprefill/health.svg)](https://phpackages.com/packages/oliverthiele-ot-formprefill)
```

###  Alternatives

[in2code/femanager

Modern TYPO3 Frontend User Registration.

49745.4k6](/packages/in2code-femanager)[in2code/powermail

Powermail is a well-known, editor-friendly, powerful and easy to use mailform extension for TYPO3 with a lots of features

982.5M38](/packages/in2code-powermail)[pagemachine/typo3-formlog

Form log for TYPO3

23225.3k6](/packages/pagemachine-typo3-formlog)[in2code/powermail_cond

Add conditions (via AJAX) to powermail forms for fields and pages

10530.6k](/packages/in2code-powermail-cond)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
