terminal42 / contao-conditionalformfields

Display form fields conditionally in Contao Open Source CMS
MIT License
18 stars 11 forks source link

Conditions using form fields of previous steps (mp_forms) not working #69

Closed megmed closed 1 year ago

megmed commented 1 year ago

It looks like, the intended changes (FormHandler L56-L68, see below) to the attributes of a form with conditions will not be applied. Therefore, neither the "cff" class nor the "data-cff-previous" attribute is added to a form with conditions. For this reason, conditions using data of previous mp_forms steps will not work, because the JavaScript cannot extract previous formData from "data-cff-previous" attribute.

https://github.com/terminal42/contao-conditionalformfields/blob/714e7e86a34a3f40659d6b0597dce40ce6bf7ea7/src/FormHandler.php#L56-L68

PHP: 7.4.30 Contao: 4.13.14 cff: 3.0.7 mp_forms: 4.4.0

aschempp commented 1 year ago

I think #70 has fixed this