Problem
When a field has a depends_on condition that is not satisfied (so the field is hidden), and the field is marked as required, the form still raises a validation error for that hidden field.
This makes it impossible to submit the form, even though the field is not visible to the user.
Steps to reproduce
- Create an EasyForm.
- Add a field
fieldA (e.g., a checkbox or select) that controls visibility of another field.
- Add a required field
fieldB, and configure its depends_on condition to only show when fieldA is true.
- Leave
fieldA unchecked (so fieldB stays hidden).
- Submit the form.
Expected behavior:
Form should submit successfully, since the hidden field fieldB is not shown to the user.
Actual behavior:
Form raises a validation error:
Environment
- Plone 5.2.14
- collective.easyform 3.2.1
- Python 3.8.18
Problem
When a field has a
depends_oncondition that is not satisfied (so the field is hidden), and the field is marked as required, the form still raises a validation error for that hidden field.This makes it impossible to submit the form, even though the field is not visible to the user.
Steps to reproduce
fieldA(e.g., a checkbox or select) that controls visibility of another field.fieldB, and configure itsdepends_oncondition to only show whenfieldAis true.fieldAunchecked (sofieldBstays hidden).Expected behavior:
Form should submit successfully, since the hidden field
fieldBis not shown to the user.Actual behavior:
Form raises a validation error:
Environment