formie
formie copied to clipboard
Issue with nested conditions
Describe the bug
The conditions don't work properly with nested fields. I'm not sure how easily this can be fixed. please follow the steps to reproduce it.
Steps to reproduce
- Import the example JSON formie-colors.json
- Check the option red and then green.
- The group with the condition (color is red) is now visible and also the child element with the condition (green is checked)
- The group with the condition (green is checked) is also visible but not the child element with the condition (color is red)
- Click the option red, now the child element red is visible
- The opposite happens if the order of action is reversed.
Form settings
- Multi-page form: No
- Submission Method: Page Reload
Craft CMS version
4.8.10
Plugin version
2.1.13
Multi-site?
No
Additional context
No response
I see the issue here, and it's because we don't evaluate all conditions for the entire form anytime anything has conditions on it. But then you run into these issues where the fields inside a Group field do need to be evaluated along with their parent.
Fixed for the next release. To get this early, run composer require verbb/formie:"dev-craft-4 as 2.1.13".
Updated in 2.1.14