PHPackages                             terminal42/contao-conditionalformfields - 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. terminal42/contao-conditionalformfields

ActiveContao-bundle[Utility &amp; Helpers](/categories/utility)

terminal42/contao-conditionalformfields
=======================================

conditionalformfields extension for Contao Open Source CMS; Display form fields based on conditionis!

3.2.0(3mo ago)2171.7k↓27.6%11[1 issues](https://github.com/terminal42/contao-conditionalformfields/issues)[1 PRs](https://github.com/terminal42/contao-conditionalformfields/pulls)1MITPHPPHP ^8.1CI passing

Since Sep 9Pushed 2mo ago5 watchersCompare

[ Source](https://github.com/terminal42/contao-conditionalformfields)[ Packagist](https://packagist.org/packages/terminal42/contao-conditionalformfields)[ GitHub Sponsors](https://github.com/terminal42)[ Fund](https://ko-fi.com/terminal42)[ RSS](/packages/terminal42-contao-conditionalformfields/feed)WikiDiscussions main Synced 3d ago

READMEChangelog (10)Dependencies (18)Versions (45)Used By (1)

contao-conditionalformfields
============================

[](#contao-conditionalformfields)

Allows you to display a form field based on a condition which allows you to do something like "only display the field when value of field 'foo' is 'bar' and 'bla' is 'yes'".

The condition is not entered directly at the form field, but a field set with start and end must be created. The condition can be entered in the start of field set. The field set can also be used to control several form fields in the view.

```
foo == 'bar' && bla == 'yes'

```

You can also check the array (e.g. multiple checkboxes or select menu):

```
in_array('bar', foo)

```

To validate a single checkbox simply compare its value:

```
foo == '1'

```

### Note for Version 3

[](#note-for-version-3)

The field names had a prefix `$` until version 3 - this is no longer necessary. When updating to version 3 or later, the conditions are automatically adjusted.

Support for member fields
-------------------------

[](#support-for-member-fields)

Version 4 adds support for conditions on member fields, e.g. for the member registration. To use conditions, you have to follow a strict setup:

1. create new DCA fields for `tl_member` with `inputType` of `fieldsetStart` and `fieldsetStop` as necessary
2. set `eval => isConditionalFormField = true` and `eval => conditionalFormFieldCondition = 'your-condition'` on the `fieldsetStart`
3. make sure to also set `feEditable` and `feGroup` accordingly
4. select the new fields in the member registration module and **sort them so the appropriate fields are within the start and stop field**.

*Known limitation: mandatory fields will not show as mandatory (asterisk) after a form submit, if they were hidden during the form submit.*

###  Health Score

62

—

FairBetter than 99% of packages

Maintenance82

Actively maintained with recent releases

Popularity41

Moderate usage in the ecosystem

Community25

Small or concentrated contributor base

Maturity84

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~98 days

Recently: every ~215 days

Total

44

Last Release

100d ago

Major Versions

1.0.1 → 2.0.02015-05-19

2.3.4 → 3.0.02022-05-23

PHP version history (4 changes)1.0.0PHP &gt;=5.3.2

2.3.4PHP ^5.3.2 || ^7.0 || ^8.0

3.0.0PHP ^7.4 || ^8.0

3.2.0PHP ^8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1073273?v=4)[Andreas Schempp](/maintainers/aschempp)[@aschempp](https://github.com/aschempp)

![](https://avatars.githubusercontent.com/u/481937?v=4)[Yanick Witschi](/maintainers/Toflar)[@Toflar](https://github.com/Toflar)

---

Top Contributors

[![aschempp](https://avatars.githubusercontent.com/u/1073273?v=4)](https://github.com/aschempp "aschempp (64 commits)")[![Toflar](https://avatars.githubusercontent.com/u/481937?v=4)](https://github.com/Toflar "Toflar (50 commits)")[![qzminski](https://avatars.githubusercontent.com/u/193483?v=4)](https://github.com/qzminski "qzminski (26 commits)")[![richardhj](https://avatars.githubusercontent.com/u/1284725?v=4)](https://github.com/richardhj "richardhj (7 commits)")[![zonky2](https://avatars.githubusercontent.com/u/1045318?v=4)](https://github.com/zonky2 "zonky2 (4 commits)")[![fritzmg](https://avatars.githubusercontent.com/u/4970961?v=4)](https://github.com/fritzmg "fritzmg (4 commits)")[![fiedsch](https://avatars.githubusercontent.com/u/5047601?v=4)](https://github.com/fiedsch "fiedsch (1 commits)")[![dmolineus](https://avatars.githubusercontent.com/u/1186266?v=4)](https://github.com/dmolineus "dmolineus (1 commits)")[![cgoIT](https://avatars.githubusercontent.com/u/8972203?v=4)](https://github.com/cgoIT "cgoIT (1 commits)")[![asaage](https://avatars.githubusercontent.com/u/4138336?v=4)](https://github.com/asaage "asaage (1 commits)")

---

Tags

contaoformfieldsconditions

### Embed Badge

![Health badge](/badges/terminal42-contao-conditionalformfields/health.svg)

```
[![Health](https://phpackages.com/badges/terminal42-contao-conditionalformfields/health.svg)](https://phpackages.com/packages/terminal42-contao-conditionalformfields)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M388](/packages/easycorp-easyadmin-bundle)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M577](/packages/shopware-core)[contao-community-alliance/dc-general

Universal data container for Contao

1680.8k92](/packages/contao-community-alliance-dc-general)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M737](/packages/sylius-sylius)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[metamodels/core

MetaModels core

10156.4k68](/packages/metamodels-core)

PHPackages © 2026

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