Form Conditions not working as expected with Forms 2.0 - 2

Tags: #<Tag:0x00007fe2d25b3c10>

Context We configured observation forms with Forms 2.0 for our implementation. We have form conditions in forms where a concept is visible or hidden depending on the condition given. This feature is not working as expected with Forms 2

Expected Result When a form condition is enabled and i select Option A initially for the form condition but before saving the form if i select Option B then Option A should automatically be unselected but both Options A and B are selected and saved

Actual Result When a form condition is enabled and i select Option A initially for the form condition but before saving the form if i select Option B then Option A should automatically be unselected and when i save the form only Option B value should be shown on UI and stored in database

Steps to reproduce Consider an observation form with below example

I have a concept by name “Have fever” with coded answers “Yes” and “No”

When i select “Yes” then another concept “Fever since” is enabled as per form condition

“Fever since” has 3 coded answers “1day” “2 days” “3 days”

I select option “1 day”

Now for concept “Have fever” i select “No” so the concept “Fever since” is hidden

Now again for “Have fever” i select “Yes”

This time “Fever since” gets enabled and already has “1 day” as preselected which should not happen

Please share your thoughts @jinal @vmalini @snehabagri

Please post your scripts as well.