Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

OpenSpecimen supports the use of skip logic i.e. to shows/hide one or more fields based on the value of another field, in custom forms.

...

Condition: Display 'FOBT Results' field when the value for 'FOBT Results' is either one of 'Positive' or 'Negative'

Syntax: 

<showWhen><![CDATA[fOBTResults = "Positive" or fOBTResults = "Negative"]]></showWhen>

 

Example of skip logic to hide/show a subform

Condition: Display the subform "Family History Details" when the value of the field "Family Cancer History" is "Yes"

Syntax (to be added just above the subform control name): <showWhen><![CDATA[familyCancerHistory = "Yes" ]]></showWhen>

Image Modified

When 'Family Cancer History' value is 'No', subform does not appear.

Image Added

When 'Family Cancer History' value is 'Yes', a subform 'Family History Details' is visible.

Image Added