terminal42 / contao-conditionalformfields
conditionalformfields extension for Contao Open Source CMS; Display form fields based on conditionis!
Installs: 13 587
Dependents: 0
Suggesters: 0
Security: 0
Stars: 15
Watchers: 5
Forks: 5
Open Issues: 5
Type:contao-module
Requires
- php: >=5.3.2
- contao-community-alliance/composer-plugin: ~2.4 || ~3.0
- contao/core-bundle: ~3.2 || ~4.1
README
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'".
$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'
Make sure jQuery is loaded for this to work.