We’re trying to enforce a rule in a xlsx form where at least one of two optional fields must be filled out. Either field - or both - can be completed, but both can’t be left blank.
Context:
provide a separate field for erf number and street number respectively. Sometimes both are known, sometimes only one or the other.
The challenge is that neither field can be marked as required. And as expected, when a field is optional and left blank (""
), its constraint doesn’t get evaluated, so the form allows submission even if both are empty.
Unfortunately, appearance=hidden
and ``relevant=false` fields also prohibit constraints from firing, so our approach of adding a note field to act as an “error message” also didn’t work.
Having a visible, required, string
field just to indicate an error just seem like terrible UX/UI and would confuse the CHW.
Has anyone dealt with this before or found a way to make this kind of conditional validation user-friendly in CHT?