PHPackages                             creationx/cixformconditions - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. creationx/cixformconditions

ActiveTypo3-cms-extension[Utility &amp; Helpers](/categories/utility)

creationx/cixformconditions
===========================

Conditional visibility for TYPO3 form framework elements (show/hide a field or text depending on another field's value).

00PHP

Since Jul 1Pushed todayCompare

[ Source](https://github.com/creationx/cixformconditions)[ Packagist](https://packagist.org/packages/creationx/cixformconditions)[ RSS](/packages/creationx-cixformconditions/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

cixformconditions
=================

[](#cixformconditions)

Conditional visibility for TYPO3 form framework elements. Bedingte Sichtbarkeit für Elemente des TYPO3 Form Frameworks.

[![TYPO3 12 LTS](https://camo.githubusercontent.com/714c680d498d32e9b309f1cc0a2dd6c09749a350aca5df3bdb438d667f9e1c94/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5459504f332d31322532304c54532d6f72616e67652e737667)](https://get.typo3.org/version/12)[![TYPO3 13 LTS](https://camo.githubusercontent.com/e5a7c1ab83706fbd48ae7cacb710f1d183fc8d8cd5e35f9c1ba93e7655fd2f86/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5459504f332d31332532304c54532d6f72616e67652e737667)](https://get.typo3.org/version/13)[![License: GPL-2.0-or-later](https://camo.githubusercontent.com/26f8b6541ea045cc1dbc2267208158b5a7ebbf5cf437c4b486d80fee9386f77e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d47504c2d2d322e302d2d6f722d2d6c617465722d626c75652e737667)](https://www.gnu.org/licenses/gpl-2.0.html)

**🌐 [English](#english) · [Deutsch](#deutsch)**

---

English
-------

[](#english)

Show or hide a form element – an input field **or** a static text – depending on the value of another field in the same form. The frontend reacts live while the user fills the form, and the server-side validation is kept consistent.

### What it does

[](#what-it-does)

For any supported form element you can configure, directly in the backend form editor:

- **Steuerfeld** (controlling field) – the identifier of the field this element depends on, e.g. `singleselect-1`.
- **Wert** (value) – the value that field must equal (`==`) for this element to be shown.

At runtime:

- **Frontend (live):** `conditional-visibility.js` shows/hides the element as the controlling field changes. While hidden, the `required` attribute is removed so the browser cannot block submission of a hidden field.
- **Server-side:** an event listener adds a form *variant* that removes the element's validators whenever the controlling field does not hold the expected value, so a hidden required field can never block form submission.
- **No-JS fallback:** without JavaScript every element stays visible; its `required` constraint is only enforced while the condition is met.

### How it works

[](#how-it-works)

ConcernImplementationEditor fields`Configuration/Form/FormSetup.yaml` (Inspector-TextEditor per element type)Data attributes in markupOverridden `Field/Field.html`, `StaticText.html`, `ContentElement.html`Live show/hide`Resources/Public/JavaScript/conditional-visibility.js`Server-side validation`Classes/EventListener/AddConditionalVisibility.php` (`Creationx\Cixformconditions`; variant on `AfterFormDefinitionLoadedEvent`)Editor + FE config + JS registration`ext_localconf.php` (`module.tx_form` + `plugin.tx_form` + `page.includeJSFooter` via `addTypoScriptSetup`, global – no site set / site TypoScript required)The condition is stored non-destructively as `properties.conditionalVisibility`on the element; the variant is derived at runtime and never written to the YAML.

### Installation / integration

[](#installation--integration)

The extension is fully autonomous – it needs no site set and no site TypoScript.

1. `composer require creationx/cixformconditions` (or add a path repository under `extensions/` and require `:@dev`).
2. Everything is registered globally in `ext_localconf.php` via `addTypoScriptSetup()`: the backend editor config (`module.tx_form`), the frontend config (`plugin.tx_form`) and the frontend JavaScript (`page.includeJSFooter`).
3. **Flush all caches** (the form configuration and TypoScript are cached). The inspector fields and the frontend script only take effect after a cache flush.

### Supported element types

[](#supported-element-types)

Text, Textarea, Email, Telephone, Url, Number, Date, SingleSelect, MultiSelect, RadioButton, Checkbox, MultiCheckbox, StaticText, ContentElement.

### Current limitations (MVP)

[](#current-limitations-mvp)

- Only the `==` operator (equals). Multiple accepted values can be given as a comma-separated list (equals-any); other operators are a later step.
- The controlling field is entered as an identifier; a dropdown of sibling fields is planned for phase 2.
- Chained conditions (A controls B controls C) are not an explicit target yet.
- Containers (e.g. GridRow) are not handled directly; put the condition on the individual elements inside the row.
- Template overrides target the default `version1` frontend template variant.

### Requirements

[](#requirements)

- TYPO3 12.4 LTS or 13.4 LTS
- `typo3/cms-form`

### License

[](#license)

Released under the [GPL-2.0-or-later](https://www.gnu.org/licenses/gpl-2.0.html) license.

---

Deutsch
-------

[](#deutsch)

Blende ein Formularelement – ein **Eingabefeld** oder einen **statischen Text** – abhängig vom Wert eines anderen Feldes im selben Formular ein oder aus. Das Frontend reagiert live, während der Nutzer das Formular ausfüllt, und die serverseitige Validierung bleibt konsistent.

### Was es macht

[](#was-es-macht)

Für jedes unterstützte Formularelement konfigurierst du direkt im Backend- Formulareditor:

- **Steuerfeld** – der Identifier des Feldes, von dem dieses Element abhängt, z. B. `singleselect-1`.
- **Wert** – der Wert, den das Steuerfeld haben muss (`==`), damit dieses Element angezeigt wird.

Zur Laufzeit:

- **Frontend (live):** `conditional-visibility.js` blendet das Element ein/aus, sobald sich das Steuerfeld ändert. Solange es ausgeblendet ist, wird das `required`-Attribut entfernt, damit der Browser das Absenden nicht wegen eines versteckten Feldes blockiert.
- **Serverseitig:** Ein Event-Listener fügt eine Formular-*Variante* hinzu, die die Validatoren des Elements entfernt, sobald das Steuerfeld nicht den erwarteten Wert hat. So kann ein verstecktes Pflichtfeld das Absenden nie blockieren.
- **Fallback ohne JS:** Ohne JavaScript bleibt jedes Element sichtbar; die `required`-Vorgabe greift nur, solange die Bedingung erfüllt ist.

### Wie es funktioniert

[](#wie-es-funktioniert)

BereichUmsetzungEditor-Felder`Configuration/Form/FormSetup.yaml` (Inspector-TextEditor je Elementtyp)Data-Attribute im MarkupÜberschriebene `Field/Field.html`, `StaticText.html`, `ContentElement.html`Live Ein-/Ausblenden`Resources/Public/JavaScript/conditional-visibility.js`Serverseitige Validierung`Classes/EventListener/AddConditionalVisibility.php` (`Creationx\Cixformconditions`; Variante über `AfterFormDefinitionLoadedEvent`)Editor- + FE-Konfig + JS-Registrierung`ext_localconf.php` (`module.tx_form` + `plugin.tx_form` + `page.includeJSFooter` via `addTypoScriptSetup`, global – kein Site Set / Site-TypoScript nötig)Die Bedingung wird verlustfrei als `properties.conditionalVisibility` am Element gespeichert; die Variante wird zur Laufzeit abgeleitet und nie in die YAML geschrieben.

### Installation / Einbindung

[](#installation--einbindung)

Die Extension ist vollständig autonom – sie benötigt weder ein Site Set noch Site-TypoScript.

1. `composer require creationx/cixformconditions` (oder ein Path-Repository unter `extensions/` einrichten und `:@dev` requiren).
2. Alles wird global in `ext_localconf.php` über `addTypoScriptSetup()`registriert: die Backend-Editor-Konfiguration (`module.tx_form`), die Frontend-Konfiguration (`plugin.tx_form`) und das Frontend-JavaScript (`page.includeJSFooter`).
3. **Alle Caches leeren** (Formularkonfiguration und TypoScript werden gecacht). Die Inspector-Felder und das Frontend-Skript greifen erst nach einem Cache-Flush.

### Unterstützte Elementtypen

[](#unterstützte-elementtypen)

Text, Textarea, Email, Telephone, Url, Number, Date, SingleSelect, MultiSelect, RadioButton, Checkbox, MultiCheckbox, StaticText, ContentElement.

### Aktuelle Einschränkungen (MVP)

[](#aktuelle-einschränkungen-mvp)

- Nur der Operator `==` (gleich). Mehrere zulässige Werte können als kommagetrennte Liste angegeben werden (equals-any); weitere Operatoren folgen später.
- Das Steuerfeld wird als Identifier eingegeben; ein Dropdown der Geschwister- Felder ist für Phase 2 geplant.
- Verkettete Bedingungen (A steuert B steuert C) sind noch kein explizites Ziel.
- Container (z. B. GridRow) werden nicht direkt behandelt; setze die Bedingung an die einzelnen Elemente innerhalb der Zeile.
- Template-Overrides zielen auf die Standard-Frontend-Template-Variante `version1`.

### Voraussetzungen

[](#voraussetzungen)

- TYPO3 12.4 LTS oder 13.4 LTS
- `typo3/cms-form`

### Lizenz

[](#lizenz)

Veröffentlicht unter der Lizenz [GPL-2.0-or-later](https://www.gnu.org/licenses/gpl-2.0.html).

###  Health Score

20

↑

LowBetter than 13% of packages

Maintenance65

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/8a527330ba950c81d73310083d0f4b1079719436ce3c4a7fcb03ae43b35d070b?d=identicon)[creationx](/maintainers/creationx)

---

Top Contributors

[![creationx](https://avatars.githubusercontent.com/u/693629?v=4)](https://github.com/creationx "creationx (3 commits)")

### Embed Badge

![Health badge](/badges/creationx-cixformconditions/health.svg)

```
[![Health](https://phpackages.com/badges/creationx-cixformconditions/health.svg)](https://phpackages.com/packages/creationx-cixformconditions)
```

###  Alternatives

[marcelweidum/filament-expiration-notice

Customize the livewire expiration notice

94135.4k5](/packages/marcelweidum-filament-expiration-notice)[omnia-digital/livewire-calendar

Laravel Livewire calendar component

13268.5k](/packages/omnia-digital-livewire-calendar)[nass600/get-id3

PHP library for handling audio/video files metadata

5833.3k3](/packages/nass600-get-id3)

PHPackages © 2026

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