cliffparnitzky / form-dependent-mandatory-field
Provides an additional option for form field to be defined as dependent mandatory. Field is mandatory if another field (or more) is filled / or not.
Fund package maintenance!
cliffparnitzky
Installs: 4 472
Dependents: 0
Suggesters: 0
Security: 0
Stars: 7
Watchers: 2
Forks: 0
Open Issues: 2
Type:contao-bundle
Requires
- php: ^8.1
- contao/core-bundle: ^5.3
- menatwork/contao-multicolumnwizard-bundle: ~3.6
Requires (Dev)
- contao/manager-plugin: ^2.12
This package is auto-updated.
Last update: 2025-06-03 22:54:34 UTC
README
Contao Extension: FormDependentMandatoryField
Provides an additional option for form fields to be defined as dependent mandatory. Field is mandatory, if another field (or more) is filled / or not / has a special value.
This special validation is executed server side and only available for forms with submission method POST
(there are no settings in form fields for forms with GET
).
Installation
Install the extension via composer: cliffparnitzky/form-dependent-mandatory-field.
If you prefer to install it manually, download the latest release here: https://github.com/cliffparnitzky/FormDependentMandatoryField/releases
Tracker
https://github.com/cliffparnitzky/FormDependentMandatoryField/issues
Compatibility
- Contao version >= 5.3.0
Dependency
This extension is dependent on the following extensions:
Screenshots
Additional information
CSS Tip
Adding special CSS, will show the difference between mandatory and dependent mandatory form fields.
This is only an example:
label.dependent.mandatory:after {
content: '(*)';
font-size: 9px;
vertical-align: super;
color: #FF7777;
}
With the CSS above, a form like the following will be created:
Thank you
- e-spin Berlin - Ingolf Steinhardt (zonky2) for the support of development
- Contao Academy - Christian Feneberg (contaoacademy) for the support of development
- leycom - media solutions - Ralph Leyendecker (leycommediasolutions) for the support of development